activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Rollback and acknowledge
Date Wed, 10 Dec 2008 15:49:36 GMT
2008/12/10 mmocnik <m.mocnik@e-nnovation.at>:
>
> Hi,
>
>
> James.Strachan wrote:
>>
>> 2008/12/10 mmocnik <m.mocnik@e-nnovation.at>:
>>>
>>> Hi,
>>>
>> [...]
>>> 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.
>> [...]
>>
>
> Hm, that's exactly what I am trying to do.
> onMessage in the MessageListener I either do session.rollback(), or
> session.commit().
> But if there are more than one message in the queue and the first one is
> poisoned, a session.rollback() causes the iteration of queued messages to
> break and redelivery is triggered (after delay).

Normally redelivery of the last message occurs - to avoid breaking
order. Is that what you need?

If you are not seeing this - are you closing & recreating the
MessageConsumer on rollback?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message