activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yong Ouyang <yong.ouy...@gmail.com>
Subject Re: Dead Letter Queue (Apollo 1.6)
Date Thu, 01 Aug 2013 12:55:29 GMT
Hi Chris, thanks for your info. I added a similar test to verify this
behavior in my project.


On Wed, Jul 31, 2013 at 11:08 PM, Christian Posta <christian.posta@gmail.com
> wrote:

> 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/scala/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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message