Hi

Answer on some of your questions.

Exchange has methods: isFailed, getException
http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/Exchange.html
 

I guess you can also configure your error handler to multicast the failed 
message to 2 destinations such as:

errorHandler(deadLetterHandler().maximumRedeliveries(2)).multicast().to("seda:dlc",
 "xmpp:xxx");

Then you get the dead message in a queue and also a notification. If you want 
"redeliver" of the "xmpp:xxx" then this can be split into 2 routes using a seda 
queue in the middle.

errorHandler(deadLetterHandler().maximumRedeliveries(2)).multicast().to("seda:dlc",
 "seda:xxx");

from("seda:xxx").errorHandler(deadLetterHandler().maximumRedeliveries(5)).to("xmpp:xxx");

The combinations is nearly endless, a bit scary ;)

I think we might have a few DSL for detecting if a message is failed, but I 
haven't used them to much. But you can always check from a processor with java 
code, or use bean or some kind of EL language.

Well try a bit more and maybe post a sample of how far you got. Then we can 
look at it again later.

You can also intercept specific exceptions and route them to your xmpp as well

Here is some links to check:
http://activemq.apache.org/camel/error-handler.html
http://activemq.apache.org/camel/exception-clause.html
http://activemq.apache.org/camel/dead-letter-channel.html 


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: harinair [mailto:[EMAIL PROTECTED] 
Sent: 19. september 2008 20:40
To: camel-user@activemq.apache.org
Subject: RE: Some questions


Thanks a lot Claus. Where can I check the exception and isFailed?

So for example my flow is something like this:
// I want to be notified if my process is having problems creating message
errorHandler -> dead letter channel -> xmpp:[EMAIL PROTECTED] with few retries

timer task -> request processor -> data assembler -> delivery-queue

// I want to try redelivering for almost an hour and I don't want to block
// the delivery queue - hence move it to redelivery-queue after 2 retries
errorHandler -> dead letter channel -> redelivery-queue retry 2 times

delivery-queue -> recipientList -> header (route)

errorHandler -> dead letter channel -> dead-letter-queue

redelivery-queue -> recipientList -> header (route)

I guess I can put a process before the dead-letter-queue to detect the
failures. How can I detect successful transmission? Do I have to put a
DelegatingProcessor before the recipientList?

Thanks a lot
Hari Gangadharan



Claus Ibsen wrote:
> 
> Hi
> 
> 
> Ad 1)
> If you are using the DeadLetterChannel in Camel to handle the retry then
> it populates the exchange with information about:
> - retry count
> - marked as redelivered
> - the caused exception
> 
> A little info here:
> http://activemq.apache.org/camel/dead-letter-channel.html
> 
> And there should be an exchange.getException() to get the caused
> exception. 
> And there is also a exchange.isFailed() method to return if the exchange
> was OK or NOT.
> 
> About HTTP, FTP and SFTP. If you are using them from Camel to communicate
> to an external system (use them as producers) then yes. If Camel can not
> for instance connect with the remote FTP server it will return the caused
> exception. Usually wrapped in a CamelRuntimeException with the original
> cause. 
> 
> BTW: You can configure the DeadLetterChannel in Camel to use all kind of
> waiting strategy between retries = RedeliveryPolicy.
> 
> http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html
> 
> 
> 
> Ad 2)
> Could you write a small sample with the problem and create a ticket for it
> in JIRA, then it's not forgotten and we could take a look.
> 
> Ad 3)
> You can use the property placeholder in some situations. We have a ticket
> to support it 100% in the future. See this FAQ entry:
> http://activemq.apache.org/camel/how-do-i-use-spring-property-placeholder-with-camel-xml.html
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Some-questions-tp19564827s22882p19577540.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to