[rabbitmq-discuss] Shovel plugin: queue.declare appears to do nothing

max at haventon.se max at haventon.se
Wed Aug 31 12:20:23 BST 2011


Hi,

When I use the following configuration file:

[
    {mnesia, [{dump_log_write_threshold, 100}]},
    {rabbit, [{vm_memory_high_watermark, 0.4}]},
    {rabbitmq_shovel, [
        {shovels, [ 
                {app_to_italy_shovel, [
                    {sources, [
                        {brokers, ["amqp://"]},
                        {declarations, [
                            {'queue.declare', [{queue, <<"italy_out">>, durable}]},
                            {'exchange.declare', [
                                {exchange, <<"out">>},
                                {type, <<"topic">>},
                                durable
                            ]},
                            {'queue.bind', [
                                {exchange, <<"out">>},
                                {queue, <<"italy_out">>},
                                {routing_key, <<"italy.#">>}
                            ]}
                        ]}
                    ]},
                    {destinations, [
                        {broker, "amqp://guest:guest@italy.company.com"}
                    ]},
                    {queue, <<"italy_out">>},
                    {publish_fields, [{exchange, <<"in">>}]}
                ]}        
                
        ]}
    ]}
].

I get the following result when running rabbit_shovel_status:status().

(rabbit at MYCOMP)1> rabbit_shovel_status:status().
[{irims_to_italy_shovel,
     {terminated,
         {{shutdown,
              {server_initiated_close,404,
                  <<"NOT_FOUND - no queue 'italy_out' in vhost '/'">>}},
          {gen_server,call,
              [<0.584.0>,
               {call,
                   {'queue.bind',0,<<"italy_out">>,<<"out">>,<<"italy.#">>,
                       false,[]},
                   none},
               infinity]}}},
     {{2011,8,31},{12,27,38}}}]

The result is exactly the same if I remove the queue.declare from declarations, which to  indicates that the queue.declare statement doesn't do anything. Worth mentioning is that it works well with the Most-Recently-Declared-Queue approach (remove "italy_out"):

(rabbit at GOT044)2> rabbit_shovel_status:status().
[{irims_to_italy_shovel,
     {running,
         {source,
             {amqp_params_direct,<<"guest">>,<<"/">>,rabbit at GOT044,none,
                 []}},
         {destination,
             {amqp_params_network,<<"guest">>,<<"guest">>,<<"/">>,
                 "got032",5672,0,0,0,none,
                 [#Fun<amqp_auth_mechanisms.plain.3>,
                  #Fun<amqp_auth_mechanisms.amqplain.3>],
                 []}}},
     {{2011,8,31},{13,15,3}}}]

However, I'd like to be able to name my queues in advance.

Using RabbitMQ 2.5.1 on Windows 7, Erlang OTP R14B03 (erl5.8.4).

Grateful for any input.
Max




More information about the rabbitmq-discuss mailing list