Hi,

First, excellent work on Camel I really like to work with it and the
Entreprise Integration Patterns.

When a message expires, I want the messaging system move it to a Dead
Letter Channel.

JmsComponent jms =
JmsComponent.jmsComponentAutoAcknowledge(connectionFactory);
  jms.setExplicitQosEnabled(true);
  jms.setTimeToLive(5000L);
  camel.addComponent("notifier", jms);
                
  camel.addRoutes(new RouteBuilder() {
        public void configure() throws Exception {
           errorHandler(deadLetterChannel("notifier:queue:error-in")
                .maximumRedeliveries(1).initialRedeliveryDelay(5000L));
           from("notifier:queue:rt-in")
                .setHeader("myHeader", javaScript("'635882461'"))
                .to("notifier:queue:rt-out");

I thought this would leave messages in the 'rt-out' queue for 5 seconds,
try to redeliver it once more and if not then send the message to the
'error-in' queue. I have also seen activemq supports an JMSExpiration
property but i'm not really sure how it works.

Any orientation on how to achieve this or if its possible with camel is
greatly appreciated.

Thanks,

Reply via email to