這是advanced.config配置文件示例:html
[git %% ------------------------------------------------ ----------------------------github %%高級Erlang網絡/羣集選項。服務器 %%網絡 %%有關詳細信息,請參見https://www.rabbitmq.com/clustering.htmlapp %% ------------------------------------------------ ----------------------------dom %%設置net_kernel的滴答時間。fetch %%請參閱http://erlang.org/doc/man/kernel_app.html和spa %% 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