|
31 | 31 | base_product_version/0, |
32 | 32 | motd_file/0, |
33 | 33 | motd/0, |
34 | | - pg_local_scope/1]). |
| 34 | + pg_local_scope/1, |
| 35 | + pg_scope_amqp091_channel/0, |
| 36 | + pg_scope_amqp091_connection/0, |
| 37 | + pg_scope_non_amqp_connection/0]). |
35 | 38 | %% For CLI, testing and mgmt-agent. |
36 | 39 | -export([set_log_level/1, log_locations/0, config_files/0]). |
37 | 40 | -export([is_booted/1, is_booted/0, is_booting/1, is_booting/0]). |
|
40 | 43 | %% Boot steps. |
41 | 44 | -export([update_cluster_tags/0, maybe_insert_default_data/0, boot_delegate/0, recover/0, |
42 | 45 | pg_local_amqp_session/0, |
43 | | - pg_local_amqp_connection/0, prevent_startup_if_node_was_reset/0]). |
| 46 | + pg_local_amqp_connection/0, |
| 47 | + pg_local_amqp091_channel/0, |
| 48 | + pg_local_amqp091_connection/0, |
| 49 | + pg_local_non_amqp_connection/0, |
| 50 | + prevent_startup_if_node_was_reset/0]). |
44 | 51 |
|
45 | 52 | -rabbit_boot_step({pre_boot, [{description, "rabbit boot start"}]}). |
46 | 53 |
|
|
292 | 299 | {enables, core_initialized}]}). |
293 | 300 |
|
294 | 301 | -rabbit_boot_step({pg_local_amqp_connection, |
295 | | - [{description, "local-only pg scope for AMQP connections"}, |
| 302 | + [{description, "local-only pg scope for AMQP 1.0 connections"}, |
296 | 303 | {mfa, {rabbit, pg_local_amqp_connection, []}}, |
297 | 304 | {requires, kernel_ready}, |
298 | 305 | {enables, core_initialized}]}). |
299 | 306 |
|
| 307 | +-rabbit_boot_step({pg_local_amqp091_channel, |
| 308 | + [{description, "local-only pg scope for AMQP 0-9-1 channels"}, |
| 309 | + {mfa, {rabbit, pg_local_amqp091_channel, []}}, |
| 310 | + {requires, kernel_ready}, |
| 311 | + {enables, core_initialized}]}). |
| 312 | + |
| 313 | +-rabbit_boot_step({pg_local_amqp091_connection, |
| 314 | + [{description, "local-only pg scope for AMQP 0-9-1 connections"}, |
| 315 | + {mfa, {rabbit, pg_local_amqp091_connection, []}}, |
| 316 | + {requires, kernel_ready}, |
| 317 | + {enables, core_initialized}]}). |
| 318 | + |
| 319 | +-rabbit_boot_step({pg_local_non_amqp_connection, |
| 320 | + [{description, "local-only pg scope for non-AMQP connections"}, |
| 321 | + {mfa, {rabbit, pg_local_non_amqp_connection, []}}, |
| 322 | + {requires, kernel_ready}, |
| 323 | + {enables, core_initialized}]}). |
| 324 | + |
300 | 325 | %%--------------------------------------------------------------------------- |
301 | 326 |
|
302 | 327 | -include_lib("rabbit_common/include/rabbit.hrl"). |
@@ -1154,9 +1179,33 @@ pg_local_amqp_connection() -> |
1154 | 1179 | PgScope = pg_local_scope(amqp_connection), |
1155 | 1180 | rabbit_sup:start_child(pg_amqp_connection, pg, [PgScope]). |
1156 | 1181 |
|
| 1182 | +pg_local_amqp091_channel() -> |
| 1183 | + PgScope = pg_local_scope(amqp091_channel), |
| 1184 | + persistent_term:put(pg_scope_amqp091_channel, PgScope), |
| 1185 | + rabbit_sup:start_child(pg_amqp091_channel, pg, [PgScope]). |
| 1186 | + |
| 1187 | +pg_local_amqp091_connection() -> |
| 1188 | + PgScope = pg_local_scope(amqp091_connection), |
| 1189 | + persistent_term:put(pg_scope_amqp091_connection, PgScope), |
| 1190 | + rabbit_sup:start_child(pg_amqp091_connection, pg, [PgScope]). |
| 1191 | + |
| 1192 | +pg_local_non_amqp_connection() -> |
| 1193 | + PgScope = pg_local_scope(non_amqp_connection), |
| 1194 | + persistent_term:put(pg_scope_non_amqp_connection, PgScope), |
| 1195 | + rabbit_sup:start_child(pg_non_amqp_connection, pg, [PgScope]). |
| 1196 | + |
1157 | 1197 | pg_local_scope(Prefix) -> |
1158 | 1198 | list_to_atom(io_lib:format("~s_~s", [Prefix, node()])). |
1159 | 1199 |
|
| 1200 | +pg_scope_amqp091_channel() -> |
| 1201 | + persistent_term:get(pg_scope_amqp091_channel). |
| 1202 | + |
| 1203 | +pg_scope_amqp091_connection() -> |
| 1204 | + persistent_term:get(pg_scope_amqp091_connection). |
| 1205 | + |
| 1206 | +pg_scope_non_amqp_connection() -> |
| 1207 | + persistent_term:get(pg_scope_non_amqp_connection). |
| 1208 | + |
1160 | 1209 | -spec update_cluster_tags() -> 'ok'. |
1161 | 1210 |
|
1162 | 1211 | update_cluster_tags() -> |
|
0 commit comments