Discussion:
[rabbitmq-users] Shovel configuration to link RabbitMQ and ActiveMQ
Sreekumar
2015-04-13 15:01:24 UTC
Permalink
Hi, I configured shovel to connect rabbitmq deployed across 2 VMs with AMQP
1.0 plugin.

RabbitMQ logs shows plugins rabbitmq_amqp1_0 enabled as below.


..log snippet start




Server startup complete; 3 plugins started.

* rabbitmq_shovel

* rabbitmq_amqp1_0

* amqp_client


.. log snippet end




At the destination rabbitmq (ip=10.53.130.136) has below entry in its
rabbitmq.config.

{rabbitmq_shovel,

[{shovels,

[{myshovels1,

[{sources, [{broker,
"amqp://user1:***@10.53.130.254:5673/mytest"}]},

{destinations, [{broker,
"amqp://user2:***@10.53.130.136:5673/mytest"}]},

{queue, <<"myTopic">>},

{ack_mode, on_confirm},

{publish_properties, [{delivery_mode, 2}]},

{publish_fields, [{exchange, <<"logs">>},

{routing_key, <<>>}]},

{reconnect_delay, 5}

]} ]} ] }

With this configuration I am able to send messages to rabbitmq
(ip=10.53.130.254) and subscribe them from rabbitmq (ip=10.53.130.136)
successfully.

After this I changed rabbitmq (ip=10.53.130.254 at port 5673) shovel
connect to Apache activemq 5.10.0 (10.53.130.254 at 5672) as the source
which is also using AMQP 1.0 protocol and listening on at port 5672.

{rabbitmq_shovel,

[{shovels,

[{myshovels1,

[{sources, [{broker,
"amqp://user1:***@10.53.130.254:5672"}]},

{destinations, [{broker,
"amqp://user2:***@10.53.130.136:5673/mytest"}]},

{queue, <<"myTopic">>},

{ack_mode, on_confirm},

{publish_properties, [{delivery_mode, 2}]},

{publish_fields, [{exchange, <<"logs">>},

{routing_key, <<>>}]},

{reconnect_delay, 5}

]}

]}

]}



].



Now I am getting below error in RabbitMQ logs=ERROR REPORT====
13-Apr-2015::11:38:38 ===

** Generic server <0.669.0> terminating

** Last message in was {'$gen_cast',init}

** When Server state == {state,undefined,undefined,undefined,undefined,

myshovels1,static,

{shovel,

{endpoint,


["amqp://user1:***@10.53.130.254:5672"],


#Fun<rabbit_shovel_config.10.129963598>},

{endpoint,


["amqp://user2:***@10.53.130.136:5673/mytest"],


#Fun<rabbit_shovel_config.10.129963598>},

1000,on_confirm,

#Fun<rabbit_shovel_config.13.29318695>,

#Fun<rabbit_shovel_config.13.29318695>,

<<"myTopic">>,5,never},


undefined,undefined,undefined,undefined,undefined}

** Reason for termination ==

** {{badmatch,{error,{socket_closed_unexpectedly,'connection.start'}}},

[{rabbit_shovel_worker,make_conn_and_chan,1,[]},

{rabbit_shovel_worker,handle_cast,2,[]},

{gen_server2,handle_msg,2,[]},

{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}


RabbitMQ and ActiveMQ both are now using AMQP 1.0 so I expect them to work
in this way. Please help me to resolve this error.

Thank you in advance.

Sree
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klishin
2015-04-14 06:46:33 UTC
Permalink
RabbitMQ's core protocol is AMQP 0-9-1. 1.0 is available with a plugin.
Shovel uses AMQP 0-9-1. To support 1.0, a new Shovel plugin would have to
be developed.

You can develop a tool that does what the Shovel plugin does in any
language that can consume from ActiveMQ
and publish to RabbitMQ (or the other way around, if needed).
Post by Sreekumar
Hi, I configured shovel to connect rabbitmq deployed across 2 VMs with
AMQP 1.0 plugin.
RabbitMQ logs shows plugins rabbitmq_amqp1_0 enabled as below.

..log snippet start



Server startup complete; 3 plugins started.
* rabbitmq_shovel
* rabbitmq_amqp1_0
* amqp_client

.. log snippet end



At the destination rabbitmq (ip=10.53.130.136) has below entry in its
rabbitmq.config.
{rabbitmq_shovel,
[{shovels,
[{myshovels1,
[{sources, [{broker, "amqp://
{destinations, [{broker, "amqp://
{queue, <<"myTopic">>},
{ack_mode, on_confirm},
{publish_properties, [{delivery_mode, 2}]},
{publish_fields, [{exchange, <<"logs">>},
{routing_key, <<>>}]},
{reconnect_delay, 5}
]} ]} ] }
With this configuration I am able to send messages to rabbitmq
(ip=10.53.130.254) and subscribe them from rabbitmq (ip=10.53.130.136)
successfully.
After this I changed rabbitmq (ip=10.53.130.254 at port 5673) shovel
connect to Apache activemq 5.10.0 (10.53.130.254 at 5672) as the source
which is also using AMQP 1.0 protocol and listening on at port 5672.
{rabbitmq_shovel,
[{shovels,
[{myshovels1,
[{sources, [{broker, "amqp://
{destinations, [{broker, "amqp://
{queue, <<"myTopic">>},
{ack_mode, on_confirm},
{publish_properties, [{delivery_mode, 2}]},
{publish_fields, [{exchange, <<"logs">>},
{routing_key, <<>>}]},
{reconnect_delay, 5}
]}
]}
]}
].
Now I am getting below error in RabbitMQ logs=ERROR REPORT====
13-Apr-2015::11:38:38 ===
** Generic server <0.669.0> terminating
** Last message in was {'$gen_cast',init}
** When Server state == {state,undefined,undefined,undefined,undefined,
myshovels1,static,
{shovel,
{endpoint,
["amqp://
#Fun<rabbit_shovel_config.10.129963598>},
{endpoint,
["amqp://
#Fun<rabbit_shovel_config.10.129963598>},
1000,on_confirm,
#Fun<rabbit_shovel_config.13.29318695>,
#Fun<rabbit_shovel_config.13.29318695>,
<<"myTopic">>,5,never},
undefined,undefined,undefined,undefined,undefined}
** Reason for termination ==
** {{badmatch,{error,{socket_closed_unexpectedly,'connection.start'}}},
[{rabbit_shovel_worker,make_conn_and_chan,1,[]},
{rabbit_shovel_worker,handle_cast,2,[]},
{gen_server2,handle_msg,2,[]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
RabbitMQ and ActiveMQ both are now using AMQP 1.0 so I expect them to work
in this way. Please help me to resolve this error.
Thank you in advance.
Sree
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+***@googlegroups.com.
To post to this group, send an email to rabbitmq-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...