Thanks again for your help,

I’m having trouble seeing how this will work. It sounds like your suggesting 
something like:

<from uri="tibco:topic:PAR.*.FX.DATA.>"/>
<setHeader headerName=”CamelJmsDestinationOverride”>
                <simple>${header.jmsDestination.topicName}</simple>
</setHeader>
<to uri=”solace-jms:topic:whatGoesHere”/>

If it’s a “to” and not a “toD” then there needs to be something static in the 
topic name – I’m not sure how to simulate the dynamic to.

Cheers
Michael


From: Claus Ibsen <claus.ib...@gmail.com>
Sent: Friday, June 14, 2019 3:07 AM
To: users@camel.apache.org
Subject: Re: Intermittent RejectedExecutionException

Hi

No I am saying that you setup the endpoint as if it was static, but
you override the destination via a special Camel header you set before

from
setHeader
to

Then you can simulate dynamic to. And in this case its actaully better
because you have 1 endpoint, instead of N endpoints where each take
some overhead compared to just 1, and therefore also they dont need to
be started as the 1 is already started.




On Thu, Jun 13, 2019 at 7:54 PM Michael Davis 
<michael.da...@solace.com<mailto:michael.da...@solace.com>> wrote:
>
> Thanks for the quick reply, Claus!
>
> My understanding is that we’d have to then configure the to: endpoint with a 
> static topic – all the messages coming out of the producer would have to have 
> the same topic, right?
>
> Can we say that this is a known issue in Camel, and that my client is not 
> doing anything wrong?
>
> Regards,
> Michael
>
> From: Claus Ibsen <claus.ib...@gmail.com<mailto:claus.ib...@gmail.com>>
> Sent: Thursday, June 13, 2019 1:13 PM
> To: users@camel.apache.org<mailto:users@camel.apache.org>
> Subject: Re: Intermittent RejectedExecutionException
>
> Hi
>
> I would try with just <to> and set a header with the dynamic
> destination (CamelJmsDestinationOverride) or something like that,
> check the docs/source code, then you use a static sender.
>
> On Thu, Jun 13, 2019 at 6:57 PM Michael Davis 
> <michael.da...@solace.com<mailto:michael.da...@solace.com<mailto:michael.da...@solace.com%3cmailto:michael.da...@solace.com>>>
>  wrote:
> >
> > Hi,
> >
> > I'm running Camel version 2.24.0, I saw the same issue with 2.23.x.
> >
> > I've got a route that connects two JMS systems. The Producer is configured 
> > with a dynamic to:
> >
> > <c:from uri="tibco:topic:PAR.*.FX.DATA.>"/>
> > <c:toD 
> > uri="solace-jms:topic:${header.jmsDestination.topicName.replace('.','/')}" 
> > />
> >
> > Sometimes, but not always, we get this error on startup:
> >
> > java.util.concurrent.RejectedExecutionException: null
> > at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:144) 
> > ~[camel-jms-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178)
> >  ~[camel-core-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
> >  ~[camel-core-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160)
> >  ~[camel-core-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
> >  [camel-core-2.23.1.jar!/:2.23.1] at 
> > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> >  [camel-core-2.23.1.jar!/:2.23.1] at 
> > org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> > [camel-core-2.23.1.jar!/:2.23.1]
> > at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> > [camel-core-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> >  [camel-core-2.23.1.jar!/:2.23.1] at 
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> >  [camel-core-2.23.1.jar!/:2.23.1]
> > at 
> > org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:113)
> >  [camel-jms-2.23.1.jar!/:2.23.1]
> >
> > This seems to happen when messages are coming in before the producer is 
> > fully initialized. If I wait until Camel starts before I start the message 
> > flow, everything works fine.
> >
> > I'm not the only one to see this problem. Someone else reported the same 
> > thing, the stack trace is almost identical (line numbers are a bit 
> > different because it's a different version:
> >
> > https://github.com/camelinaction/camelinaction2/issues/18<https://github.com/camelinaction/camelinaction2/issues/18><https://github.com/camelinaction/camelinaction2/issues/18<https://github.com/camelinaction/camelinaction2/issues/18>>
> >
> > Has anyone else seen this? Does anyone know how to fix it?
> >
> > Thanks
> > Michael Davis
> > Ottawa
> >
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com<http://davsclaus.com><http://davsclaus.com<http://davsclaus.com>>
>  @davsclaus
> Camel in Action 2: 
> https://www.manning.com/ibsen2<https://www.manning.com/ibsen2><https://www.manning.com/ibsen2<https://www.manning.com/ibsen2>>



--
Claus Ibsen
-----------------
http://davsclaus.com<http://davsclaus.com> @davsclaus
Camel in Action 2: 
https://www.manning.com/ibsen2<https://www.manning.com/ibsen2>

Reply via email to