You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by pratibhaG <pr...@in2m.com> on 2008/07/07 14:03:15 UTC

how to get the redelivery count

i have following configuration:
exception(java.net.ConnectException.class)
.maximumRedeliveries(2).useExponentialBackOff().initialRedeliveryDelay(30000).backOffMultiplier(2.0)
.to("jbi:service:http://servicemix.in2m.com/samples/http/bean1Service?mep=in-out")
.to("jbi:service:service:http://servicemix.in2m.com/samples/http/errorHandler");

from("jbi:service:http://servicemix.in2m.com/samples/http/jmsConsumer1")
        .intercept(new DelegateProcessor() {
                      public void process(Exchange exchange) {
                               	  proceed(exchange);
                                 System.out.println("******************
exchange"+exchange);
				//logic to send message to Error handler	
                       }
        };  })
.to("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService?mep=in-out");

Here
System.out.println("****************** exchange"+exchange); line prints
following:
in first attempt:
****************** exchangeExchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@ee94c8{properties:
{}}]
 and in second attempt:
****************** exchangeExchange[JbiMessage:
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl@ee94c8{properties:
{org.apache.camel.Redelivered=true, org.apache.camel.RedeliveryCounter=1}}]


In my logic to send message to error handler i have to create a custom error
message and send message to error handler only in case of it is tried for
maximum redeliveries that is 2 in this case, saying RedeliveryCounter=1. 

The problem i am facing is I am not able to get the property
org.apache.camel.RedeliveryCounter=1 from exchange object. how can i get it.
as it prints in the exchange there will be some way. please help me to get
it.

-Pratibha
-- 
View this message in context: http://www.nabble.com/how-to-get-the-redelivery-count-tp18315153p18315153.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: how to get the redelivery count

Posted by pratibhaG <pr...@in2m.com>.
got it
Prtaibha

-- 
View this message in context: http://www.nabble.com/how-to-get-the-redelivery-count-tp18315153p18315956.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.