Hi Claus, Michael, I've seen this with 21.3 as well in the RabbitMQ component. Since the Rabbit component is heavily based on the JMS component then I would suspect the issue is the same for both. Doesn't happen very often but enough to be of concern. In production that means I'd move any messages into 'hold' queues before starting the Camel app. Then once everything has started up I'd just move the messages back into the processing queues.
For the direct endpoints we have this in the route config (and it's helping): ?block=true&timeout=30000 Would you know if there is something similar available for the rabbitmq/jms/bean components? The routes are basically of these two types: from(rabbitmq:someInputEndpoint) .process(doSomeProcessing) .to(rabbitmq:someOutputEndpoint) and from(rabbitmq:someInputEndpoint) .to(bean:someProcessingBeanThatEndsFlow) Thanks, Valdis -----Original Message----- From: Claus Ibsen [mailto:[email protected]] Sent: 14 June 2019 08:07 To: [email protected] Subject: Re: Intermittent RejectedExecutionException CAUTION: This email originated from outside of Vhi. D o not click links or open attachments unless you know the content is safe. 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 <[email protected]> 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 <[email protected]> > Sent: Thursday, June 13, 2019 1:13 PM > To: [email protected] > 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 > <[email protected]<mailto:[email protected]>> 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(SendDynamicP > > rocessor.java:160) ~[camel-core-2.23.1.jar!/:2.23.1] at > > org.apache.camel.processor.RedeliveryErrorHandler.process(Redelivery > > ErrorHandler.java:548) [camel-core-2.23.1.jar!/:2.23.1] at > > org.apache.camel.processor.CamelInternalProcessor.process(CamelInter > > nalProcessor.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(CamelInter > > nalProcessor.java:201) [camel-core-2.23.1.jar!/:2.23.1] at > > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAs > > yncProcessor.java:97) [camel-core-2.23.1.jar!/:2.23.1] at > > org.apache.camel.component.jms.EndpointMessageListener.onMessage(End > > pointMessageListener.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://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9Hwq > > gEjpB_nuK_Sk0ZSw&s=33&u=https%3a%2f%2fgithub%2ecom%2fcamelinaction%2 > > fcamelinaction2%2fissues%2f18<https://scanmail.trustwave.com/?c=1726 > > 8&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEjpB_nuK_Sk0ZSw&s=33&u=https%3a%2f%2f > > github%2ecom%2fcamelinaction%2fcamelinaction2%2fissues%2f18> > > > > Has anyone else seen this? Does anyone know how to fix it? > > > > Thanks > > Michael Davis > > Ottawa > > > > > -- > Claus Ibsen > ----------------- > http://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEj > pB_nrexTxEaGw&s=33&u=http%3a%2f%2fdavsclaus%2ecom<http://scanmail.trus > twave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEjpB_nrexTxEaGw&s=33&u > =http%3a%2f%2fdavsclaus%2ecom> @davsclaus Camel in Action 2: > https://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgE > jpB_nri_GhtMSA&s=33&u=https%3a%2f%2fwww%2emanning%2ecom%2fibsen2<https > ://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEjpB_n > ri_GhtMSA&s=33&u=https%3a%2f%2fwww%2emanning%2ecom%2fibsen2> -- Claus Ibsen ----------------- http://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEjpB_nrexTxEaGw&s=33&u=http%3a%2f%2fdavsclaus%2ecom @davsclaus Camel in Action 2: https://scanmail.trustwave.com/?c=17268&d=lceD3YWHFCubnxIaZ9HGIe9HwqgEjpB_nri_GhtMSA&s=33&u=https%3a%2f%2fwww%2emanning%2ecom%2fibsen2 Vhi Group DAC (Vhi) is a holding company for insurance and healthcare services, which include Vhi Healthcare DAC, Vhi Insurance DAC, Vhi Health Services DAC and Vhi Investments DAC. Vhi Healthcare DAC trading as Vhi Healthcare and Vhi Insurance DAC trading as Vhi Insurance are regulated by the Central Bank of Ireland. Vhi Healthcare is tied to Vhi Insurance DAC for health insurance in Ireland which is underwritten by Vhi Insurance DAC. Vhi Healthcare is tied to Zurich Life Assurance plc for Vhi Life Term Insurance and Vhi Mortgage Protection which are underwritten by Zurich Life Assurance plc. Vhi Healthcare is tied to Collinson Insurance Solutions Europe Limited for MultiTrip Travel Insurance and Vhi Dental Insurance which are underwritten by Great Lakes Insurance SE and for Vhi International Health Insurance which is underwritten by Collinson Insurance Europe Limited. For more information about the Vhi Group please go to: https://www.vhi.ie/about-vhi. Tá Vhi Group DAC (Vhi) ina chuideachta sealbhaíochta le haghaidh seirbhísí árachais agus seirbhísí cúram sláinte, lena n-áirítear Vhi Healthcare DAC, Vhi Insurance DAC, Vhi Health Services DAC agus Vhi Investments DAC. Déanann Banc Ceannais na hÉireann rialáil ar Vhi Healthcare DAC, ag trádáil dó mar Vhi Healthcare, agus ar Vhi Insurance DAC, ag trádáil dó mar Vhi Insurance. Tá Vhi Healthcare ceangailte le Vhi Insurance DAC le haghaidh árachas sláinte in Éirinn, rud atá frithgheallta ag Vhi Insurance DAC. Tá Vhi Healthcare ceangailte le Zurich Life Assurance plc le haghaidh Árachais Saoil de chuid Vhi agus Árachas Cosanta Morgáiste de chuid Vhi atá frithgheallta ag Zurich Life Assurance plc. Tá Vhi Healthcare ceangailte le Collinson Insurance Solutions Europe Limited le haghaidh Árachas Taistil Ilturais agus Árachas Fiaclóireachta de chuid Vhi atá frithgheallta ag Great Lakes Insurance SE agus le haghaidh Árachas Sláinte Idirnáisiúnta de chuid Vhi atá frithgheallta ag Collinson Insurance Europe Limited. Chun tuilleadh faisnéise a fháil faoi Ghrúpa Vhi, tabhair cuairt ar: https://www.vhi.ie/about-vhi. This e-mail and any files transmitted with it contain information which may be confidential and which may also be privileged and is intended solely for the use of the individual or entity to whom it is addressed. Unless you are the intended recipient you may not copy or use it, or disclose it to anyone else. Any opinions expressed are that of the individual and not necessarily that of the Vhi Group. If you have received this e-mail in error please notify the sender by return.
