Hi All,

I have code that cause infinite loop in redelivery message if I am using
routing slip.

onException(Exception.class).handled(true).maximumRedeliveries(1).useOriginalMessage()
        .convertBodyTo(String.class).to("file://D:/inbox/error");
    from("activemq://MY.QUEUE").transacted("PROPAGATION_REQUIRED")
        .convertBodyTo(String.class).process(new Processor() {
          @Override
          public void process(Exchange exchange) throws Exception {
            exchange.getIn().setHeader("path", "file://Z:/data");
          }
        }).routingSlip(header("path")).ignoreInvalidEndpoints();

The destination path in here is invalid.
Message exchange has failed: so breaking out of the routing slip for
exchange: Exchange[JmsMessage[JmsMessageID:
ID:JCSS047-50730-1335510299080-0:1:1:1:1]] Exception:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Failed delivery for (MessageId: ID:JCSS047-50730-1335510299080-0:1:1:1:1 on
ExchangeId: ID-JCSS047-51263-1335511934318-0-1). On delivery attempt: 0
caught: org.apache.camel.component.file.GenericFileOperationFailedException:
Cannot store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Redelivery delay calculated as 0
Cannot build directory [Z:\data] (could be because of denied permissions)

Message exchange has failed: so breaking out of the routing slip for
exchange: Exchange[JmsMessage[JmsMessageID:
ID:JCSS047-50730-1335510299080-0:1:1:1:1]] Exception:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Failed delivery for (MessageId: ID:JCSS047-50730-1335510299080-0:1:1:1:1 on
ExchangeId: ID-JCSS047-51263-1335511934318-0-1). *On delivery attempt: 1*
caught: org.apache.camel.component.file.GenericFileOperationFailedException:
Cannot store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Redelivery delay calculated as 0
Cannot build directory [Z:\data] (could be because of denied permissions)

Message exchange has failed: so breaking out of the routing slip for
exchange: Exchange[JmsMessage[JmsMessageID:
ID:JCSS047-50730-1335510299080-0:1:1:1:1]] Exception:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Failed delivery for (MessageId: ID:JCSS047-50730-1335510299080-0:1:1:1:1 on
ExchangeId: ID-JCSS047-51263-1335511934318-0-1). *On delivery attempt: 1*
caught: org.apache.camel.component.file.GenericFileOperationFailedException:
Cannot store file: Z:\data\ID-JCSS047-50730-1335510299080-0-1-1-1-1
Redelivery delay calculated as 0
Cannot build directory [Z:\data] (could be because of denied permissions)

Ini here, I saw that attempt value is not increased, always 1.

Please kindly help me to figure out what's wrong with my code.

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Routing-Slip-error-in-Camel-tp5669518p5669518.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to