On Sat, 2009-11-21 at 09:20 +0100, Claus Ibsen wrote:
> Hi
> 
> Digged a bit deeper and seems the issue is that the assertion on the
> constant seems wrong as you set the body to an empty string.
> Which then causes Camel to look into the backing JMS message where it
> can find the "foo" body. Despite the body is "".
> 
> Seems as Camel in the setBody should also set a DefaultMessage to
> prevent still propagating specialized messages contains when you have
> changed the body to something else.
> Using this the backing JMS message will be gone and the "foo" message
> is not present anymore.
> 
> The problem is that you want to use transacted routes and using Camel
> redelivery policies, eg the stuff you do with onException.
> What happens at runtime is that the message is NOT rolled back to the
> JMS queue as Camel does local error handling. So after 2 errors its
> just handled=true and moved to a mock.
> 
> And  .useOriginalBody() is only triggered when the message is moved to
> the mock:error queue.
> 
> 

Thanks! This clears up many things. Perhaps documentation should be more
detailed on transacted vs. non-transacted error handling.

Another question. I want to redeliver N times and, if all fail, send
message to another queue. If I want messages to be rolled back to JMS
each time (not redelivered to the failed part of the route). How would I
do that ?


-- 
Dragisa Krsmanovic
Java Developer
Public Library of Science 
http://www.plos.org


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is confidential to the intended recipient. If you have received it 
in error, please notify the sender and delete it from your system. Any 
unauthorized use, disclosure or copying is not permitted. The views or opinions 
presented are solely those of the sender and do not necessarily represent those 
of Public Library of Science unless otherwise specifically stated. Please note 
that neither Public Library of Science nor any of its agents accept any 
responsibility for any viruses that may be contained in this e-mail or its 
attachments and it is your responsibility to scan the e-mail and attachments 
(if any).

Reply via email to