這是advanced.config配置文件示例:
[ %% ------------------------------------------------ ---------------------------- %%高級Erlang網絡/群集選項。 %% %%有關詳細信息,請參見https://www.rabbitmq.com/clustering.html %% ------------------------------------------------ ---------------------------- %%設置net_kernel的滴答時間。 %%請參閱http://erlang.org/doc/man/kernel_app.html和 %% https://www.rabbitmq.com/nettick.html了解更多詳細信息。 %% %% {kernel,[{net_ticktime,60}]}, %% ------------------------------------------------ ---------------------------- %% RabbitMQ Shovel插件 %% %%有關詳細信息,請參見https://www.rabbitmq.com/shovel.html %% ------------------------------------------------ ----------------------------
{rabbitmq_shovel, [{shovels, [%% A named shovel worker. %% {my_first_shovel, %% [
%% 列出要消費的源代理。 %% %% {sources, %% [%% URI(s) and pre-declarations for all source broker(s). %% {brokers, ["amqp://user:password@host.domain/my_vhost"]}, %% {declarations, []} %% ]},
%%列出要發布到的目標代理。 %% {destinations, %% [%% A singular version of the 'brokers' element. %% {broker, "amqp://"}, %% {declarations, []} %% ]},
%% shovel 中消息隊列的名稱 %% %% {queue, <<"your-queue-name-goes-here">>},
%% 可選的預取計數。 %% %% {prefetch_count, 10},
%%何時確認消息: %%-no_ack:從不(自動) %%-on_publish:每封郵件重新發布后 %%-on_confirm:目標經紀人確認收貨時 %% %% {ack_mode, on_confirm},
%% 覆蓋出站basic.publish的字段。 %% %% {publish_fields, [{exchange, <<"my_exchange">>}, %% {routing_key, <<"from_shovel">>}]},
%% 要在重新發布時設置的basic.properties的靜態列表。 %% %% {publish_properties, [{delivery_mode, 2}]},
%%嘗試嘗試之前要等待的秒數連接失敗時重新連接。 %% %% {reconnect_delay, 2.5}
%% ]} %% my_first_shovel的結尾 ]} %% Rather than specifying some values per-shovel, you can specify %% them for all shovels here. %%除了指定每個shovel的某些值外,您還可以指定 %%他們為這里的所有shovel。 %% %% {defaults, [{prefetch_count, 0}, %% {ack_mode, on_confirm}, %% {publish_fields, []}, %% {publish_properties, [{delivery_mode, 2}]}, %% {reconnect_delay, 2.5}]} ]},
{rabbitmq_auth_backend_ldap, [ %% %% 授權 %% ============= %%
%% LDAP插件可以針對您的服務器執行各種查詢 %% LDAP服務器確定授權問題。看到 %% https://www.rabbitmq.com/ldap.html#authorisation了解更多信息。
%% 設置確定虛擬主機訪問時要使用的查詢 %% %% {vhost_access_query, {in_group, %% "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}},
%% 設置要在確定資源(例如隊列)訪問時使用的查詢 %% %% {resource_access_query, {constant, true}},
%% 設置查詢以確定用戶擁有哪些標簽 %% %% {tag_queries, []} ]} ]. |
github鏈接:https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/advanced.config.example