Q1: The camel routes, endpoints etc. has org.apache.camel.Service where they can do cleanup in the stop() callback. So yes you should be able to stop routes at runtime.
Q2: This is the default DeadLetterChannel that kicks in and tries to redeliver the failed exchange. You can use error handler to trap certain exceptions and route it to unsubscribe http://activemq.apache.org/camel/error-handler.html http://activemq.apache.org/camel/dead-letter-channel.html exception(Exception.class).to("unsubscribe"); from("x").to("y"); You can also set the a route specific error handler to eg no try 6 times but go to unsubscribe immediately, or maybe 2 retreis but use 5 sec interval etc. From("x") .errorHandler(deadLetterChannel()).maximumRedeliveries(2). initialRedeliveryDelay(5000) .to("y"); Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: pawel.jasinski [mailto:[EMAIL PROTECTED] Sent: 7. september 2008 14:11 To: camel-user@activemq.apache.org Subject: publish-subscribe hi all, what i am trying to accomplish is publish-subscribe pattern. The subscribers are dynamic (come and go at will). There is a static endpoint which receives subscribe request. Request contains URL where the subscriber expects messages to be delivered as well as filtering rules. I add vm:tmpQueue_n to the recipientList and add route from("vm:tmpQueue_n").process(filter).to(URL). When the subscriber send unsubscribe, I remove the entry from the recipientList (vm:tmpQueue_n), and remove the route. Q1. Is it ok to remove routes from the context which is already started? Q2. When the subscriber dies, the CXF endpoint attempts (i believe 6) redeliveries. What is the best way to hook "unsubscribe" to failed delivery? Pawel -- View this message in context: http://www.nabble.com/publish-subscribe-tp19357407s22882p19357407.html Sent from the Camel - Users mailing list archive at Nabble.com.