我正在試圖爲RabbitMQ配置一個Shovel插件,並帶有一個聲明列表。我在創建遠程交換機時配置了備用交換機。RabbitMQ鏟交替配置
我的問題是,我無法獲得鏟的配置文件,以包含此參數,以便RabbitMQ在啓動時崩潰。
這是我的配置是什麼樣子:
[
{mnesia, [{dump_log_write_threshold, 100}]},
{rabbit, [{vm_memory_high_watermark, 0.4}]},
{rabbitmq_shovel,
[{shovels,
[{call_stats_shovel,
[{sources, [{broker, "amqp://guest:[email protected]:5672/test"},
{declarations,
[{'queue.declare', [{queue, <<"incoming">>}, durable]},
{'exchange.declare',[{exchange, <<"my-exchange-topic">>},{type, <<"topic">>},durable]},
{'queue.bind',[{exchange, <<"my-exchange-topic">>},{queue, <<"incoming">>}]}
]}]},
{destinations, [{broker, "amqp://guest:[email protected]:5672/blah"},
{declarations,
[
{'queue.declare',[{queue, <<"billing">>},durable]},
{'exchange.declare',[{exchange, <<"my-exchange-topic">>},{type, <<"topic">>},{alternate_exchange, <<"alt">>}, durable]},
{'queue.bind',[{exchange, <<"my-exchange-topic">>},{queue, <<"billing">>},{routing_key, <<"physical">>}]}
]}
]},
{queue, <<"incoming">>},
{ack_mode, no_ack},
{publish_properties, [{delivery_mode, 2}]},
{reconnect_delay, 5}
]}
]
}]
}
].
的問題是目的地交換叫我交換話題。如果我拿出聲明部分,那麼配置文件就可以工作。
這是錯誤:
= INFO REPORT ==== 31-JUL-2012 :: 12:15:25 === 應用:rabbitmq_shovel 退出:{{invalid_shovel_configuration,call_stats_shovel, { invalid_parameter_value,目的地, {unknown_fields, 'exchange.declare', [alternate_exchange]}}},{ rabbit_shovel,啓動,[正常,[]]}} 類型:永久
如果我離開alternate_exchange節在聲明中,我在Rabb中得到這個錯誤itMQ網絡管理:
{{shutdown, {server_initiated_close,406, <<"PRECONDITION_FAILED - inequivalent arg 'alternate-exchange'for exchange 'my-exchange-topic' in vhost 'blah': received none but current is the value 'alt' of type 'longstr'">>}}, {gen_server,call, [<0.473.0>, {call, {'exchange.declare',0,<<"my-exchange-topic">>,<<"topic">>,false, true,false,false,false,[]}, none,<0.444.0>}, infinity]}}