[rabbitmq-discuss] question, Shovel : different queue name between source and destination

Brendan Hay brendan at soundcloud.com
Fri May 18 09:37:20 BST 2012


Bino,

You consume from a queue on one broker, and publish/shovel to an exchange
somewhere else..

Therefore, you can use the 'declarations' part of 'destination'
configuration to set up a differently named queue and bind it to the
exchange to which the messages are being published.

I've tried to outline the above in a (untested) configuration snippet here:
https://gist.github.com/2723964

It simply predeclares an exchange, queue, and binding on the source
'host1', so messages published to <<"source_exchange">> (with the direct
routing key) will be consumed by shovel, and then published to
<<"destination_exchange">> on the destination 'host2'.

Because of the declarations in the destination configuration, messages will
then be routed and queued in <<"destination_queue">>

Hopefully that makes sense.

- Brendan

On Fri, May 18, 2012 at 10:13 AM, bino oetomo <bino at indoakses-online.com>wrote:

> Dear All ....
>
> Is it possible to use shovel with different queue_name between source and
> destination ?
>
> my current config file is :
> --------START-----------
> [
>    {mnesia, [{dump_log_write_threshold, 100}
>             ]},
>    {rabbit, [{vm_memory_high_watermark, 0.4}
>             ]},
>    {rabbitmq_shovel,
>       [{shovels,
>         [{myshovel,
>           [{sources, [{broker, "amqp://guest:guest@localhost"**}]},
>            {destinations, [{broker, "amqp://guest:guest@192.168.**10.241<guest%3Aguest@192.168.10.241>
> "}]},
>            {queue, <<"task_queue">>},
>            {reconnect_delay, 5}
>           ]}
>          ]
>        }]
>     }
> ].
>
> --------STOP------------
>
> What if the queue name at the source broker is 'src_q1' and at the
> destination broker is 'dst_q1' ?
>
> Sincerely
> -bino-
> ______________________________**_________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120518/be54a0ec/attachment.htm>


More information about the rabbitmq-discuss mailing list