Shovel configuration to link RabbitMQ and ActiveMQ

579 views
Skip to first unread message

Sreekumar

unread,
Apr 13, 2015, 11:01:25 AM4/13/15
to rabbitm...@googlegroups.com

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:pa...@10.53.130.254:5673/mytest"}]},

                      {destinations, [{broker, "amqp://user2:pa...@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:pa...@10.53.130.254:5672"}]},

                       {destinations, [{broker, "amqp://user2:pa...@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:pa...@10.53.130.254:5672"],

                                    #Fun<rabbit_shovel_config.10.129963598>},

                                {endpoint,

                                    ["amqp://user2:pa...@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

 





Michael Klishin

unread,
Apr 14, 2015, 2:46:33 AM4/14/15
to rabbitm...@googlegroups.com
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). 
Reply all
Reply to author
Forward
0 new messages