我正在试图为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]}}