activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Rollback and acknowledge
Date Wed, 10 Dec 2008 13:20:24 GMT
2008/12/10 mmocnik <>:
> Hi,
> I'm using ActiveMQ 5.1.0 to asynchronously send mail via an unrelyable mail
> server.
> I'm using session.rollback() if a delivery attempt failed, since I couldn't
> get redelivery done any other way.
> (I'm using vm://localhost by the way)
> Problem: Poison Messages. If a message really isn't deliverable because of a
> user error or such, the server tries to redeliver this message until its
> redelivery limit is reached. ALL subsequent messages that are sent before
> the limit is reached are postponed.
> So:
> Is there any way to just rollback one message?

Sure - so long as you do a commit/rollback on each message :). i.e. if
you do a commit or rollback after processing each message then only 1
message will ever be rolled back.

> Is there an alternative to session.rollback()?


> What requirements are there for CLIENT_ACKNOWLEDGE to work?

Client acknowledge is just a way to tell the message broker when you
have ack'd it - there's no un-ack. If you want to fail a message then
rollback() is what you need


Open Source Integration

View raw message