[rabbitmq-discuss] Basic help with Shovel

ristretto.rb ristretto.rb at gmail.com
Wed Apr 20 06:25:47 BST 2011


Hello,

Rabbitmq is a very nice product.  Thanks to all the people that have
put in time to creating this excellent bit of software.

I am trying to get a simple example of rabbitmq-shovel working between
two rabbitmq brokers.  I have the shovel plugin installed
(rabbitmq-shovel-2.4.1.ez.)  I'm using the rabbit 2.4.0:

I have tried a number of config files. Here is a basic one:

[{rabbit_shovel,
  [{shovels,
    [{outgoing,
      [{sources,  [{brokers,
                          ["amqp://"]}
                       ]},
       {destinations, [{broker, "amqp://tortuga/"}
                       ]},
       {queue, <<"outgoing">>},
       {prefetch_count, 1},
       {auto_ack, false},
       {tx_size, 0},
       {publish_properties, [{delivery_mode, 2}]},
       {publish_fields, [{exchange, <<"test_exchange">>},
                        {routing_key, <<"from_shovel">>}]},
      {reconnect_delay, 5}
      ]}
     ]
   }]
}].

My local system is the source, and my server named tortuga is the destination.

When I start the server, I get no errors.  But, when I look at
rabbit_shovel_status:status(), I see that the 'outgoing' exchange is
not found.  Should Shovel be creating that?

> rabbit_shovel_status:status().
[{outgoing,{terminated,{{shutdown,{server_initiated_close,404,
                                                          <<"NOT_FOUND
- no queue 'outgoing' in vhost '/'">>}},
                        {gen_server,call,
                                    [<0.12894.0>,

{subscribe,{'basic.consume',0,<<"outgoing">>,<<>>,false,

false,false,false,[]},
                                                <0.12886.0>},
                                     infinity]}}},
           {{2011,4,19},{22,12,0}}}]


In addition to all this, it seem that Shovel might be creating a bunch
of unnamed queues

$ sudo rabbitmqctl list_queues
[sudo] password for gbc:
Listing queues ...
amq.gen-Mi/SRrrk8QayvJsAGHgU3A==	0
amq.gen-tmkeQdFucANNYBE+Cvv2VQ==	0
amq.gen-iNur60R7wa1LOCMa6R6Klw==	0
amq.gen-AKxkcLiF1zh9EP6ArECZ3g==	0
amq.gen-htu38N+C5w2gCiTMdU3bug==	0
amq.gen-0vYlOHEJc0YjjBMZGecRng==	0
amq.gen-8n2ik3Z2+K/2D6SGS1dFjQ==	0
amq.gen-9Iys32AxkmLb6/9QW1jV3Q==	0
amq.gen-COSLe9fteqxWxcPGRm+1EQ==	0
amq.gen-fwJtLeLJQUqHeQP5fQzjsw==	0
amq.gen-P8c2DgxawkRAIWzP/8GeKw==	0
amq.gen-OxwGmt3k+3vDrt6Mhl1Emw==	0
amq.gen-oCLpwM/nNVmCXT1rr/pJ6A==	0
amq.gen-+aEtMLnGXrcTCs+WHVeStA==	0
amq.gen-vOzzeILG+M7iynDRmyypaQ==	0
amq.gen-q8CYOBNl8JXketYJq6Je5Q==	0
amq.gen-9cQqY8oqkPYj+cSS9fuOQw==	0
:
:

Thank you



Finally, if I put a declaration in to the sources or destinations it
makes no difference.  I thought, perhaps, that these lines would
create the exchange for me.

:
{declarations,
     ['queue.declare',
         {'queue.bind',
          [{exchange, <<"test_exchange">>},
           {queue,    <<>>}]}
      ]}
:

Do I need to pre-create the exchanges and queues?

Thanks


More information about the rabbitmq-discuss mailing list