3333 pg_local_scope /1 ,
3434 pg_scope_amqp091_channel /0 ,
3535 pg_scope_amqp091_connection /0 ,
36- pg_scope_non_amqp_connection /0 ]).
36+ pg_scope_non_amqp_connection /0 ,
37+ pg_scope_direct_connection /0 ]).
3738% % For CLI, testing and mgmt-agent.
3839-export ([set_log_level /1 , log_locations /0 , config_files /0 ]).
3940-export ([is_booted /1 , is_booted /0 , is_booting /1 , is_booting /0 ]).
4647 pg_local_amqp091_channel /0 ,
4748 pg_local_amqp091_connection /0 ,
4849 pg_local_non_amqp_connection /0 ,
50+ pg_local_direct_connection /0 ,
4951 prevent_startup_if_node_was_reset /0 ]).
5052
5153-rabbit_boot_step ({pre_boot , [{description , " rabbit boot start" }]}).
316318 {requires , kernel_ready },
317319 {enables , core_initialized }]}).
318320
321+ -rabbit_boot_step ({pg_local_direct_connection ,
322+ [{description , " local-only pg scope for direct connections" },
323+ {mfa , {rabbit , pg_local_direct_connection , []}},
324+ {requires , kernel_ready },
325+ {enables , core_initialized }]}).
326+
319327% %---------------------------------------------------------------------------
320328
321329-include_lib (" rabbit_common/include/rabbit.hrl" ).
@@ -1162,6 +1170,11 @@ pg_local_non_amqp_connection() ->
11621170 persistent_term :put (pg_scope_non_amqp_connection , PgScope ),
11631171 rabbit_sup :start_child (pg_non_amqp_connection , pg , [PgScope ]).
11641172
1173+ pg_local_direct_connection () ->
1174+ PgScope = pg_local_scope (direct_connection ),
1175+ persistent_term :put (pg_scope_direct_connection , PgScope ),
1176+ rabbit_sup :start_child (pg_direct_connection , pg , [PgScope ]).
1177+
11651178pg_local_scope (Prefix ) ->
11661179 list_to_atom (io_lib :format (" ~s _~s " , [Prefix , node ()])).
11671180
@@ -1174,6 +1187,9 @@ pg_scope_amqp091_connection() ->
11741187pg_scope_non_amqp_connection () ->
11751188 persistent_term :get (pg_scope_non_amqp_connection ).
11761189
1190+ pg_scope_direct_connection () ->
1191+ persistent_term :get (pg_scope_direct_connection ).
1192+
11771193- spec update_cluster_tags () -> 'ok' .
11781194
11791195update_cluster_tags () ->
0 commit comments