Hi guys,
I declare a exception handling for one of my route. If the exception occurs,
I'd like to change the state of that failed message and do a re-delivery. So
far I have my route built like this

public void configure() throws Exception
    {
        onException(MemoException.class)
            .maximumRedeliveries(1)
            .handled(true)
            // increase retry count
            .transform().body()
                .process(new Processor() {

                    @Override
                    public void process(Exchange exchange) throws Exception
                    {
                        ShortMessage shortMessage =
exchange.getIn().getBody(ShortMessage.class);
                        shortMessage.increaseRetryCount();
                    }
                    
                });
        
        from("jms:queue:memoReadyToProcess")
            .process(new MemoCreationProcessor());
    }

Weird thing is even my MemoCreationProcessor did receive the second retry
message, that message state was not changed (not called 'increaseRetryCount"
above).
The message state on ly changed after the redelivery failed.

So the work flow here as I understand is:

Calling MemoCreationProcessor -> failed -> calling MemoCreationProcessor
again -> failed -> calling exception handling -> changed message state

Is my assumption correct? If that's the case and I need to change state of
my failed message, how could I do it?

Thanks a bunch riders,

Doug
-- 
View this message in context: 
http://www.nabble.com/Understanding-Exception-Clause-tp21039113s22882p21039113.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to