[rabbitmq-discuss] DLQ Problems

Gary Russell grussell at vmware.com
Tue Apr 3 16:25:45 BST 2012


Hi,

I am testing DLQs with 2.8.1.

I have a simple durable queue, with the x-dead-letter-exhange set to a 
simple direct exchange.

When I receive a message, I send a basic.reject (with requeue false); my 
understanding is that this should go the d-l-exhange and use the  same 
routing key there.

I have routing key 'si.test.binding' bound to 'si.test.queue' on my 
primary exchange (si.test.exchange); and 'si.test.binding' bound to 
'si.dlq' on the si.dlq.exchange.

Before sending a message, I see si.test.queue with the D and DLX flags 
in the admin console. However, when I reject the message, my original 
queue disappears, and the message does not show up on the DLQ.

I figure I must be missing something simple, but the fact my original 
queue is deleted concerns me.

This is in the log...

=INFO REPORT==== 3-Apr-2012::11:01:25 ===
accepting AMQP connection <0.26275.1> (127.0.1.1:38710 -> 127.0.1.1:5672)

=ERROR REPORT==== 3-Apr-2012::11:01:31 ===
** Generic server <0.26290.1> terminating
** Last message in was {'$gen_cast',
                         {dead_letter,
                          {{basic_message,
                            
{resource,<<"/">>,exchange,<<"si.test.exchange">>},
                            [<<"si.test.binding">>],
                            {content,60,none,
<<248,0,10,116,101,120,116,47,112,108,97,105,110,5,
                               85,84,70,45,56,0,0,0,0,2,0>>,
                             rabbit_framing_amqp_0_9_1,
                             [<<"xxx">>]},
<<45,248,235,97,167,255,225,89,178,123,85,134,123,
                              221,200,209>>,
                            true},
                           0},
                          rejected}}
** When Server state == {q,
                          {amqqueue,
                           {resource,<<"/">>,queue,<<"si.test.queue">>},
                           true,false,none,
                           [{<<"x-dead-letter-exchange">>,longstr,
<<"si.dlq.exchange">>}],
<0.26290.1>,[],undefined},
                          none,true,rabbit_variable_queue,
                          {vqstate,
                           {0,{[],[]}},
                           {0,{[],[]}},
                           {delta,undefined,0,undefined},
                           {0,{[],[]}},
                           {0,{[],[]}},
                           1,
                           {1,
                            {0,
                             {msg_status,0,
<<45,248,235,97,167,255,225,89,178,123,85,134,123,
                                221,200,209>>,
                              undefined,true,true,true,true,
                              {message_properties,undefined,false}},
                             nil,nil}},
                           undefined,
                           {0,nil},
                           {qistate,
                            
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/queues/89R1RVA4SJVF9J34SJFJ3SI0K",
                            {{dict,0,16,16,8,80,48,
                              
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                              
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                []}}},
                             [{segment,0,
                               
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/queues/89R1RVA4SJVF9J34SJFJ3SI0K/0.idx",
                               {array,16384,0,undefined,
                                
{{{{{{{<<45,248,235,97,167,255,225,89,178,123,
                                         85,134,123,221,200,209>>,
                                       {message_properties,undefined,false},
                                       true},
                                      del,no_ack},
                                     
undefined,undefined,undefined,undefined,
                                     
undefined,undefined,undefined,undefined,
                                     undefined},
                                    10,10,10,10,10,10,10,10,10,10},
                                   100,100,100,100,100,100,100,100,100,100},
                                  
1000,1000,1000,1000,1000,1000,1000,1000,1000,
                                  1000},
                                 10000,10000,10000,10000,10000,10000,10000,
                                 10000,10000,10000}},
                               1}]},
                            #Ref<0.0.0.108169>,2,262144,
                            #Fun<rabbit_variable_queue.2.91259159>,
                            {0,nil}},
                           {{client_msstate,msg_store_persistent,
<<54,34,9,193,160,112,127,104,114,220,250,198,197,
                               219,10,49>>,
                             {dict,0,16,16,8,80,48,
                              
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                              
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                []}}},
                             {state,229447,
                              
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/msg_store_persistent"},
                             rabbit_msg_store_ets_index,
                             
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/msg_store_persistent",
<0.210.0>,233544,225350,237641,241738},
                            {client_msstate,msg_store_transient,
<<236,159,45,16,62,51,168,190,137,52,88,73,76,239,
                               82,120>>,
                             {dict,0,16,16,8,80,48,
                              
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                              
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                                []}}},
                             {state,208962,
                              
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/msg_store_transient"},
                             rabbit_msg_store_ets_index,
                             
"/var/lib/rabbitmq/mnesia/rabbit at arwen3/msg_store_transient",
<0.205.0>,213059,204858,217156,221253}},
                           
true,0,#Fun<rabbit_amqqueue_process.5.77899751>,0,1,
                           infinity,1,0,0,1,1,
                           {rates,
                            {{1333,465285,369999},0},
                            {{1333,465285,369999},0},
                            0.0,0.0,
                            {1333,465286,453226}},
                           {0,nil},
                           {0,nil},
                           {0,nil},
                           {0,nil},
                           0,1,
                           {rates,
                            {{1333,465285,369999},0},
                            {{1333,465285,369999},0},
                            0.0,0.0,
                            {1333,465286,453226}}},
                          {[{<0.26279.1>,
                             
{consumer,<<"amq.ctag-Q3QQmteYvhLYCrhOvf6xLB">>,
                              true}}],
                           []},
                          undefined,undefined,#Ref<0.0.0.108171>,undefined,
                          {state,fine,5000,#Ref<0.0.0.108172>},
                          {0,nil},
                          undefined,undefined,1,
                          {0,nil},
                          {0,nil},
                          undefined,
                          {dict,0,16,16,8,80,48,
                           
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                           
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},
                          {resource,<<"/">>,exchange,<<"si.dlq.exchange">>},
                          undefined}
** Reason for termination ==
** {{badrecord,'P_basic'},
     [{rabbit_basic,replace_headers,2},
      {rabbit_amqqueue_process,make_dead_letter_msg,4},
      {rabbit_amqqueue_process,dead_letter_msg_existing_dlx,4},
      {gen_server2,handle_msg,2},
      {proc_lib,wake_up,3}]}

=ERROR REPORT==== 3-Apr-2012::11:01:32 ===
connection <0.26275.1>, channel 2 - error:
{amqp_error,not_found,"no queue 'si.test.queue' in vhost 
'/'",'queue.declare'}

Thanks


More information about the rabbitmq-discuss mailing list