camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Routing from non existing JMS topics
Date Sun, 26 Feb 2012 07:31:21 GMT
On Sat, Feb 25, 2012 at 11:35 PM, shindito <> wrote:
> Hi Narita,
> Thanks for the prompt reply.
> For my use case, however, I needed to have Camel notifying me about JMS
> related exceptions like InvalidDestinationException (thrown by JMS
> providers not supporting the automatical destination creation). The problem
> was that I've missed to setup an ExceptionListener on the JMSComponent.
> After setting it Camel started to forward InvalidDestinationExceptions to
> the specified Listener. I just wasn't aware of this part of the Camel JMS
> API.

See the JMS documentation, and use the errorHandler and
exceptionListener options.

It may depend on the JMS client which kind of exception is being
thrown, and when that happens.
So you need to work your way and figure this out.

Also some JMS clients can be configured the check for errors eagerly
and synchronous so the client can thrown
back an exception during the send operation.

> Best regards,
> Atanas
> On Thu, Feb 23, 2012 at 5:59 PM, narita [via Camel] <
>> wrote:
>> Related to -
>> Thanks.
>> Regards,
>> Narita
>> -----Original Message-----
>> From: shindito [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=5508460&i=0>]
>> Sent: Thursday, February 23, 2012 9:23 PM
>> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=5508460&i=1>
>> Subject: Routing from non existing JMS topics
>> Hello all,
>> As you know, ActiveMQ supports the following functionality:
>> If a client subscribes to a topic that currently does not exists on the
>> JMS provider, then this topic is automatically created and bound to the JMS
>> provider.
>> However, the JMS provider that we currently use, does not support this
>> functionality.
>> And here comes the problem - when I create a route from a topic that does
>> not exist on the JMS provider, I expect to get a JMSException notifying
>> about the non existing destination. Unfortunately, this does not happen.
>> I've managed to configure the Camel context to inform me if the JMS
>> provider is down by setting the "testConnectionOnStartup" property of the
>> JMS component. It works just fine. But when I set this property and create
>> a route from a topic that does not exist no exception is thrown.
>> I've tried using try/catch blocks, onException and errorhandlers, but it
>> does not work since no exchange is ever created and all these techniques
>> are designed to handle errors that are thrown during the processing of
>> messages.
>> In my case, no message is ever sent.
>> Is there anyway to catch these exceptions?
>> Thanks for your help!
>> Best regards,
>> Atanas
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at
>> ***The information transmitted is intended only for the person or entity
>> to which it is addressed and may contain confidential and/or privileged
>> material. Any review,retransmission,dissemination or other use of, or
>> taking of any action in reliance upon, this information by persons or
>> entities other than the intended recipient is prohibited. If you received
>> this in error, please contact the sender and delete the material from any
>> computer.***
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>  To unsubscribe from Routing from non existing JMS topics, click here<>
>> .
>> NAML<>
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message