[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: Dead Letter Queue (Apollo 1.6)
From:       Christian Posta <christian.posta () gmail ! com>
Date:       2013-07-31 15:08:44
Message-ID: CAKS7T5Pcs-dEYsFEXpV5YHp3TEo+9GenP2hKhoNKRPK8k03t=Q () mail ! gmail ! com
[Download RAW message or body]


So keep in mind that nak_limit on the broker side is the number of poison
pills the broker will accept before moving a message to dlq.

I'm guessing in your ActiveQM 5.x client, you are expecting your redelivery
policy to send back an nack for each rollback? ...but it doesn't. It sends
a nack (poison pill) after the redelivery options have been exhausted:

http://activemq.apache.org/message-redelivery-and-dlq-handling.html

"Once a message's redelivery attempts exceeds the maximumRedeliveries
configured for the Redelivery
Policy<http://activemq.apache.org/redelivery-policy.html>,
a "Poison ack" is sent back to the broker letting him know that the message
was considered a poison pill. "

So to behave like ActiveMQ 5.x broker, you'll want to set <queue
nak_limit="1" ... /> and also configure your redelivery maximumRedeliveries
== n where n is the number of rollbacks you expect.

I've committed a tests on the Apollo code base to demonstrate this:

Check the very last test named "Rollback moves messages to DLQ" here:

http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/test/s \
cala/org/apache/activemq/apollo/openwire/test/OpenwireParallelTest.scala?view=markup




On Wed, Jul 31, 2013 at 6:53 AM, Yong Ouyang <yong.ouyang@gmail.com> wrote:

> I use OpenWire protocol on the client side, where connection is created by
> ActiveMQConnectionFactory
> 
> 
> On Wed, Jul 31, 2013 at 9:43 PM, Christian Posta
> <christian.posta@gmail.com>wrote:
> 
> > What protocol are you using on the client side?
> > 
> > 
> > On Wed, Jul 31, 2013 at 6:31 AM, Yong Ouyang <yong.ouyang@gmail.com>
> > wrote:
> > 
> > > Hello,
> > > 
> > > I am playing with Apollo 1.6 recently. Given the below config, I am
> > > expecting a dead message (being rolled back 3 times, for example) of
> > queue
> > > "app1.queue1" will be forwarded to the dead letter queue
> > "dlq.app1.queue1".
> > > But this doesn't actually happen at all. Did anyone encounter the same
> > > behavior? Thank you.
> > > 
> > > ...
> > > <virtual_host id="default">
> > > ...
> > > <queue id="app1.**" dlq="dlq.*" nak_limit="3"
> auto_delete_after="0"/>
> > > ...
> > > </virtual_host>
> > > ...
> > > 
> > > Regards,
> > > Yong
> > > 
> > 
> > 
> > 
> > --
> > *Christian Posta*
> > http://www.christianposta.com/blog
> > twitter: @christianposta
> > 
> 



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic