You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Shultz, Dmitry" <Dm...@kaltire.com> on 2020/08/19 20:08:13 UTC

SJMS2 durable subscription lazy re-connect

Hi All,

I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.

When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.

Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?

2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR o.a.c.component.sjms.SjmsConsumer - Unable to create the MessageConsumer
javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:865)
at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:583)
at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:557)
at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscriptionTopicConsumer(Jms2ObjectFactory.java:141)
at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMessageConsumer(Jms2ObjectFactory.java:97)
at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:72)
at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:56)
at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:42)
at org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsConsumer.java:186)
at org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer.java:47)
at org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesFactory.makeObject(SjmsConsumer.java:65)
at org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesFactory.makeObject(SjmsConsumer.java:56)
at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1691)
at org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsConsumer.java:138)
at org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.java:131)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3710)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:4028)
at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3963)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3883)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3647)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3488)
at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3247)
at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3243)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3266)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3243)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3159)
at org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache/camel/CamelContext.java)
at org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:436)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:348)
at org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:84)
at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:313)
at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:676)
at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:490)
at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:485)
at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:736)
at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:330)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:960)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:754)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1303)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5134)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1135)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1869)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-08-19 13:03:10.775 [localhost-startStop-1] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1 (CamelContext: tire-lodge) is shutting down

Cheers,
Dmitry


Re: SJMS2 durable subscription lazy re-connect

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for testing on 3.x.

Camel 2.x is not actively developed (we only do patch releases with
security fixes or some selected bugs) and I suggest to upgrade to 3.x
if you can.
If you cant upgrade then I suggest you try to find our yourselves -
you can diff the code between 2.x and 3.x on camel-sjms2 to see if you
can find out what may fix or improve this. And if so provide a PR
against 2.25.x branch.

On Sat, Aug 29, 2020 at 2:10 AM Shultz, Dmitry
<Dm...@kaltire.com> wrote:
>
> Hi Claus,
>
> By not consumin I mean the messages are not consumed/processed when I send them to the destination.
>
> I can confirn  it works in Camel 3, here is the test I created  https://github.com/zeppelinux/CamelCDISjmsTest/tree/v3routeController
>
> Tried to make the same test/reproducer for 2.25.2 following the same pattern (generate project using -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-cdi) and created branch (https://github.com/zeppelinux/CamelCDISjmsTest/tree/v2routeController), but it doesn't work for different reason - process is stuck during start up on something, so I'm stuck too.. here is the log:
>
> [INFO] --- camel-maven-plugin:2.25.2:run (default-cli) @ sjmsTest ---
> [INFO] You can skip tests from the command line using: mvn camel:run -Dmaven.test.skip=true
> [INFO] camel-cdi detected on classpath
> [WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
> [INFO] Using org.apache.camel.cdi.Main to initiate a CamelContext
> [INFO] Starting Camel ...
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Aug 28, 2020 4:54:12 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
> INFO: WELD-000900: 3.0.5 (Final)
> Aug 28, 2020 4:54:13 PM org.jboss.weld.bootstrap.WeldStartup startContainer
> INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
> Aug 28, 2020 4:54:13 PM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
> INFO: WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType<?>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
> Aug 28, 2020 4:54:13 PM org.jboss.weld.environment.se.WeldContainer fireContainerInitializedEvent
> INFO: WELD-ENV-002003: Weld SE container 6b4d6ca4-e3e3-4cf8-9b40-d1c3920071b2 initialized
>
>
> Cheers,
> Dmitry
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Friday, August 21, 2020 7:08 AM
> To: users@camel.apache.org
> Subject: Re: SJMS2 durable subscription lazy re-connect
>
> Hi
>
> Okay so when you say "not consuming anything", then you cant see any other activity or logs from it?
> And if are able to look on the JMS server side, maybe it has a way of showing details of active durable subscribers of the topci.
>
> Also if you have the opportunity to try a little example with just Camel 3.4.x and see if you can reproduce it. We have done some work on camel-sjms also in Camel 3 recently.
>
> Or if you can put together a reproducer example as a .zip with instructions or on github etc then we / others can easier take a look at it.
> https://urldefense.com/v3/__https://camel.apache.org/community/support/__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-TWq2LG6$
>
> On Thu, Aug 20, 2020 at 11:37 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
> >
> > Thanks Claus.
> >
> > I'm on v2.25.1 (TomEE + CDI) and didn't found any examples/docs about how to set the SupervisingRouteController, so here is what I did:
> >
> >     @Produces
> >     @ApplicationScoped
> >     CamelContext customize() {
> >         SupervisingRouteController controller = new SupervisingRouteController();
> >         BackOff backOff = new BackOff();
> >         backOff.setDelay(Duration.ofMillis(3000));
> >         backOff.setMaxDelay(Duration.ofMillis(30000));
> >         backOff.setMultiplier(2.0);
> >         controller.setBackOff("jms-events", backOff);
> >
> >         context = new DefaultCamelContext();
> >         controller.setCamelContext(context);
> >         context.setRouteController(controller);
> >        ... the rest of the context initialization
> >
> > The first exception (when subscription is already taken)  is logged initially and I can see this right after it:
> >
> > 2020-08-20 14:20:49.732 [http-nio-8081-exec-4] INFO
> > o.a.c.i.SupervisingRouteController$RouteManager - Start supervising
> > route: jms-events with back-off: BackOff{delay=PT3S, maxDelay=PT30S,
> > maxElapsedTime=PT2562047788015H12M55.807S, maxAttempts=100,
> > multiplier=2.0}
> > 2020-08-20 14:20:49.737 [http-nio-8081-exec-4] INFO
> > o.a.c.i.SupervisingRouteController - Total managed routes: 7 of which
> > 6 successfully started and 1 re-starting
> >
> > Then, after 6 seconds:
> >
> > 2020-08-20 14:20:55.736 [Camel Thread #1 - Supervi] INFO
> > o.a.c.i.SupervisingRouteController$RouteManager - Try to restart
> > route: jms-events
> > 2020-08-20 14:20:55.913 [Camel Thread #1 - Supervi] ERROR
> > o.a.c.component.sjms.SjmsConsumer - Unable to create the
> > MessageConsumer
> > javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
> >         at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(
> > ActiveMQSession.java:865)
> >
> > And then after another 12 sec:
> >
> > 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO
> > o.a.c.i.SupervisingRouteController$RouteManager - Try to restart
> > route: jms-events
> > 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO
> > o.a.camel.impl.DefaultCamelContext - Route: jms-events started and
> > consuming from:
> > sjms://topic:kt.mix.easybook.events?durableSubscriptionId=tire-lodge-d
> > ev
> >
> > But, It is not actually consuming anything - confirmed (subscription is still taken). Is it a bug or I'm missing something?
> >
> > Cheers,
> > Dmitry
> >
> > -----Original Message-----
> > From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> > Sent: Wednesday, August 19, 2020 10:03 PM
> > To: users@camel.apache.org
> > Subject: Re: SJMS2 durable subscription lazy re-connect
> >
> > Hi
> >
> > In Camel 3 there is a route controller you can use to configure Camel to restart the failing route up till X times.
> > In Camel 2 that controller was implemented as an experiment so you may
> > find it there and try to use it for 2.25.x
> >
> > On Wed, Aug 19, 2020 at 10:08 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
> > >
> > > Hi All,
> > >
> > > I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.
> > >
> > > When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
> > > Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.
> > >
> > > Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?
> > >
> > > 2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR
> > > o.a.c.component.sjms.SjmsConsumer - Unable to create the
> > > MessageConsumer
> > > javax.jms.IllegalStateException: Cannot create a subscriber on the
> > > durable subscription since it already has subscriber(s) at
> > > org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsume
> > > r(
> > > ActiveMQSession.java:865) at
> > > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurable
> > > Su
> > > bscriber(ActiveMQSession.java:583)
> > > at
> > > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurable
> > > Su
> > > bscriber(ActiveMQSession.java:557)
> > > at
> > > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscri
> > > pt
> > > ionTopicConsumer(Jms2ObjectFactory.java:141)
> > > at
> > > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMe
> > > ss
> > > ageConsumer(Jms2ObjectFactory.java:97)
> > > at
> > > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > > Co
> > > nsumer(Jms2ObjectFactory.java:72) at
> > > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > > Co
> > > nsumer(Jms2ObjectFactory.java:56) at
> > > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > > Co
> > > nsumer(Jms2ObjectFactory.java:42) at
> > > org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsCons
> > > um
> > > er.java:186) at
> > > org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer
> > > .j
> > > ava:47) at
> > > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResource
> > > sF
> > > actory.makeObject(SjmsConsumer.java:65)
> > > at
> > > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResource
> > > sF
> > > actory.makeObject(SjmsConsumer.java:56)
> > > at
> > > org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObje
> > > ct
> > > Pool.java:1691) at
> > > org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsC
> > > on
> > > sumer.java:138) at
> > > org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.ja
> > > va
> > > :131) at
> > > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72
> > > )
> > > at
> > > org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelC
> > > on
> > > text.java:3710) at
> > > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsum
> > > er
> > > s(DefaultCamelContext.java:4028) at
> > > org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(Defa
> > > ul
> > > tCamelContext.java:3963) at
> > > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(D
> > > ef
> > > aultCamelContext.java:3883) at
> > > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(Defa
> > > ul
> > > tCamelContext.java:3647) at
> > > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelC
> > > on
> > > text.java:3488) at
> > > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext
> > > .j
> > > ava:3247) at
> > > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext
> > > .j
> > > ava:3243) at
> > > org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(D
> > > ef
> > > aultCamelContext.java:3266) at
> > > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.
> > > java:3243) at
> > > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72
> > > )
> > > at
> > > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.
> > > ja
> > > va:3159) at
> > > org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache
> > > /c
> > > amel/CamelContext.java) at
> > > org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(Cdi
> > > Ca
> > > melExtension.java:436) at
> > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > > .j
> > > ava:62) at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > > ss
> > > orImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
> > > at
> > > org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodIm
> > > pl
> > > .java:348) at
> > > org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(Co
> > > nt
> > > ainerEventObserverMethodImpl.java:84)
> > > at
> > > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodIm
> > > pl
> > > .java:313) at
> > > org.apache.webbeans.event.NotificationManager.fireEvent(Notification
> > > Ma
> > > nager.java:676) at
> > > org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerI
> > > mp
> > > l.java:490) at
> > > org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(Bea
> > > nM
> > > anagerImpl.java:485) at
> > > org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidati
> > > on
> > > Event(BeansDeployer.java:736) at
> > > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:3
> > > 30
> > > ) at
> > > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLife
> > > cy
> > > cle.java:196) at
> > > org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadS
> > > in
> > > gletonServiceImpl.java:189) at
> > > org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> > > at
> > > org.apache.openejb.assembler.classic.Assembler.createApplication(Ass
> > > em
> > > bler.java:960) at
> > > org.apache.openejb.assembler.classic.Assembler.createApplication(Ass
> > > em
> > > bler.java:754) at
> > > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWe
> > > bA
> > > ppBuilder.java:1303) at
> > > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatW
> > > eb
> > > AppBuilder.java:1125) at
> > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(Globa
> > > lL
> > > istenerSupport.java:133) at
> > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleB
> > > as
> > > e.java:94) at
> > > org.apache.catalina.core.StandardContext.startInternal(StandardConte
> > > xt
> > > .java:5134) at
> > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > > at
> > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
> > > java:754) at
> > > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:7
> > > 30
> > > ) at
> > > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744
> > > )
> > > at
> > > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.ja
> > > va
> > > :1135) at
> > > org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
> > > java:1869) at
> > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:5
> > > 11
> > > ) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > > at
> > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor
> > > .j
> > > ava:1149) at
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> > > java:624) at java.lang.Thread.run(Thread.java:748)
> > > 2020-08-19 13:03:10.775 [localhost-startStop-1] INFO
> > > o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1
> > > (CamelContext: tire-lodge) is shutting down
> > >
> > > Cheers,
> > > Dmitry
> > >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!MFMRO
> > MWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXnDFm3jI$
> > @davsclaus Camel in Action 2:
> > https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaM
> > nLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXlge_
> > t6l$
>
>
>
> --
> Claus Ibsen
> -----------------
> https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-WeK217O$  @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-aSlQwRM$



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

RE: SJMS2 durable subscription lazy re-connect

Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
Hi Claus,

By not consumin I mean the messages are not consumed/processed when I send them to the destination.

I can confirn  it works in Camel 3, here is the test I created  https://github.com/zeppelinux/CamelCDISjmsTest/tree/v3routeController

Tried to make the same test/reproducer for 2.25.2 following the same pattern (generate project using -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-cdi) and created branch (https://github.com/zeppelinux/CamelCDISjmsTest/tree/v2routeController), but it doesn't work for different reason - process is stuck during start up on something, so I'm stuck too.. here is the log:

[INFO] --- camel-maven-plugin:2.25.2:run (default-cli) @ sjmsTest ---
[INFO] You can skip tests from the command line using: mvn camel:run -Dmaven.test.skip=true
[INFO] camel-cdi detected on classpath
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
[INFO] Using org.apache.camel.cdi.Main to initiate a CamelContext
[INFO] Starting Camel ...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Aug 28, 2020 4:54:12 PM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 3.0.5 (Final)
Aug 28, 2020 4:54:13 PM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Aug 28, 2020 4:54:13 PM org.jboss.weld.event.ExtensionObserverMethodImpl checkRequiredTypeAnnotations
INFO: WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType<?>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
Aug 28, 2020 4:54:13 PM org.jboss.weld.environment.se.WeldContainer fireContainerInitializedEvent
INFO: WELD-ENV-002003: Weld SE container 6b4d6ca4-e3e3-4cf8-9b40-d1c3920071b2 initialized


Cheers,
Dmitry

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Friday, August 21, 2020 7:08 AM
To: users@camel.apache.org
Subject: Re: SJMS2 durable subscription lazy re-connect

Hi

Okay so when you say "not consuming anything", then you cant see any other activity or logs from it?
And if are able to look on the JMS server side, maybe it has a way of showing details of active durable subscribers of the topci.

Also if you have the opportunity to try a little example with just Camel 3.4.x and see if you can reproduce it. We have done some work on camel-sjms also in Camel 3 recently.

Or if you can put together a reproducer example as a .zip with instructions or on github etc then we / others can easier take a look at it.
https://urldefense.com/v3/__https://camel.apache.org/community/support/__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-TWq2LG6$ 

On Thu, Aug 20, 2020 at 11:37 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
>
> Thanks Claus.
>
> I'm on v2.25.1 (TomEE + CDI) and didn't found any examples/docs about how to set the SupervisingRouteController, so here is what I did:
>
>     @Produces
>     @ApplicationScoped
>     CamelContext customize() {
>         SupervisingRouteController controller = new SupervisingRouteController();
>         BackOff backOff = new BackOff();
>         backOff.setDelay(Duration.ofMillis(3000));
>         backOff.setMaxDelay(Duration.ofMillis(30000));
>         backOff.setMultiplier(2.0);
>         controller.setBackOff("jms-events", backOff);
>
>         context = new DefaultCamelContext();
>         controller.setCamelContext(context);
>         context.setRouteController(controller);
>        ... the rest of the context initialization
>
> The first exception (when subscription is already taken)  is logged initially and I can see this right after it:
>
> 2020-08-20 14:20:49.732 [http-nio-8081-exec-4] INFO  
> o.a.c.i.SupervisingRouteController$RouteManager - Start supervising 
> route: jms-events with back-off: BackOff{delay=PT3S, maxDelay=PT30S, 
> maxElapsedTime=PT2562047788015H12M55.807S, maxAttempts=100, 
> multiplier=2.0}
> 2020-08-20 14:20:49.737 [http-nio-8081-exec-4] INFO  
> o.a.c.i.SupervisingRouteController - Total managed routes: 7 of which 
> 6 successfully started and 1 re-starting
>
> Then, after 6 seconds:
>
> 2020-08-20 14:20:55.736 [Camel Thread #1 - Supervi] INFO  
> o.a.c.i.SupervisingRouteController$RouteManager - Try to restart 
> route: jms-events
> 2020-08-20 14:20:55.913 [Camel Thread #1 - Supervi] ERROR 
> o.a.c.component.sjms.SjmsConsumer - Unable to create the 
> MessageConsumer
> javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
>         at 
> org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(
> ActiveMQSession.java:865)
>
> And then after another 12 sec:
>
> 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  
> o.a.c.i.SupervisingRouteController$RouteManager - Try to restart 
> route: jms-events
> 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  
> o.a.camel.impl.DefaultCamelContext - Route: jms-events started and 
> consuming from: 
> sjms://topic:kt.mix.easybook.events?durableSubscriptionId=tire-lodge-d
> ev
>
> But, It is not actually consuming anything - confirmed (subscription is still taken). Is it a bug or I'm missing something?
>
> Cheers,
> Dmitry
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Wednesday, August 19, 2020 10:03 PM
> To: users@camel.apache.org
> Subject: Re: SJMS2 durable subscription lazy re-connect
>
> Hi
>
> In Camel 3 there is a route controller you can use to configure Camel to restart the failing route up till X times.
> In Camel 2 that controller was implemented as an experiment so you may 
> find it there and try to use it for 2.25.x
>
> On Wed, Aug 19, 2020 at 10:08 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
> >
> > Hi All,
> >
> > I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.
> >
> > When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
> > Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.
> >
> > Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?
> >
> > 2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR 
> > o.a.c.component.sjms.SjmsConsumer - Unable to create the 
> > MessageConsumer
> > javax.jms.IllegalStateException: Cannot create a subscriber on the 
> > durable subscription since it already has subscriber(s) at 
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsume
> > r(
> > ActiveMQSession.java:865) at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurable
> > Su
> > bscriber(ActiveMQSession.java:583)
> > at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurable
> > Su
> > bscriber(ActiveMQSession.java:557)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscri
> > pt
> > ionTopicConsumer(Jms2ObjectFactory.java:141)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMe
> > ss
> > ageConsumer(Jms2ObjectFactory.java:97)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > Co
> > nsumer(Jms2ObjectFactory.java:72) at 
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > Co
> > nsumer(Jms2ObjectFactory.java:56) at 
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessage
> > Co
> > nsumer(Jms2ObjectFactory.java:42) at 
> > org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsCons
> > um
> > er.java:186) at
> > org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer
> > .j
> > ava:47) at
> > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResource
> > sF
> > actory.makeObject(SjmsConsumer.java:65)
> > at
> > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResource
> > sF
> > actory.makeObject(SjmsConsumer.java:56)
> > at
> > org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObje
> > ct
> > Pool.java:1691) at
> > org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsC
> > on
> > sumer.java:138) at
> > org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.ja
> > va
> > :131) at
> > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72
> > )
> > at
> > org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelC
> > on
> > text.java:3710) at
> > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsum
> > er
> > s(DefaultCamelContext.java:4028) at
> > org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(Defa
> > ul
> > tCamelContext.java:3963) at
> > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(D
> > ef
> > aultCamelContext.java:3883) at
> > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(Defa
> > ul
> > tCamelContext.java:3647) at
> > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelC
> > on
> > text.java:3488) at
> > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext
> > .j
> > ava:3247) at
> > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext
> > .j
> > ava:3243) at
> > org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(D
> > ef
> > aultCamelContext.java:3266) at
> > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.
> > java:3243) at
> > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72
> > )
> > at
> > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.
> > ja
> > va:3159) at
> > org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache
> > /c
> > amel/CamelContext.java) at
> > org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(Cdi
> > Ca
> > melExtension.java:436) at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > .j
> > ava:62) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > ss
> > orImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> > org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodIm
> > pl
> > .java:348) at
> > org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(Co
> > nt
> > ainerEventObserverMethodImpl.java:84)
> > at
> > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodIm
> > pl
> > .java:313) at
> > org.apache.webbeans.event.NotificationManager.fireEvent(Notification
> > Ma
> > nager.java:676) at
> > org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerI
> > mp
> > l.java:490) at
> > org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(Bea
> > nM
> > anagerImpl.java:485) at
> > org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidati
> > on
> > Event(BeansDeployer.java:736) at
> > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:3
> > 30
> > ) at
> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLife
> > cy
> > cle.java:196) at
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadS
> > in
> > gletonServiceImpl.java:189) at
> > org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> > at
> > org.apache.openejb.assembler.classic.Assembler.createApplication(Ass
> > em
> > bler.java:960) at
> > org.apache.openejb.assembler.classic.Assembler.createApplication(Ass
> > em
> > bler.java:754) at
> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWe
> > bA
> > ppBuilder.java:1303) at
> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatW
> > eb
> > AppBuilder.java:1125) at
> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(Globa
> > lL
> > istenerSupport.java:133) at
> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleB
> > as
> > e.java:94) at
> > org.apache.catalina.core.StandardContext.startInternal(StandardConte
> > xt
> > .java:5134) at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
> > java:754) at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:7
> > 30
> > ) at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744
> > )
> > at
> > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.ja
> > va
> > :1135) at
> > org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
> > java:1869) at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:5
> > 11
> > ) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor
> > .j
> > ava:1149) at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> > java:624) at java.lang.Thread.run(Thread.java:748)
> > 2020-08-19 13:03:10.775 [localhost-startStop-1] INFO 
> > o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1
> > (CamelContext: tire-lodge) is shutting down
> >
> > Cheers,
> > Dmitry
> >
>
>
> --
> Claus Ibsen
> -----------------
> https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!MFMRO
> MWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXnDFm3jI$  
> @davsclaus Camel in Action 2: 
> https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaM
> nLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXlge_
> t6l$



--
Claus Ibsen
-----------------
https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-WeK217O$  @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaMnLCM!IyzVpU09xWlFt6zbUvbaDjk6XvlBfCI-r_V--mIk6M7RtGV2mVKZ249-bOxp-aSlQwRM$ 

Re: SJMS2 durable subscription lazy re-connect

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Okay so when you say "not consuming anything", then you cant see any
other activity or logs from it?
And if are able to look on the JMS server side, maybe it has a way of
showing details of active durable subscribers of the topci.

Also if you have the opportunity to try a little example with just
Camel 3.4.x and see if you can reproduce it. We have done some work on
camel-sjms also in Camel 3 recently.

Or if you can put together a reproducer example as a .zip with
instructions or on github etc then we / others can easier take a look
at it.
https://camel.apache.org/community/support/

On Thu, Aug 20, 2020 at 11:37 PM Shultz, Dmitry
<Dm...@kaltire.com> wrote:
>
> Thanks Claus.
>
> I'm on v2.25.1 (TomEE + CDI) and didn't found any examples/docs about how to set the SupervisingRouteController, so here is what I did:
>
>     @Produces
>     @ApplicationScoped
>     CamelContext customize() {
>         SupervisingRouteController controller = new SupervisingRouteController();
>         BackOff backOff = new BackOff();
>         backOff.setDelay(Duration.ofMillis(3000));
>         backOff.setMaxDelay(Duration.ofMillis(30000));
>         backOff.setMultiplier(2.0);
>         controller.setBackOff("jms-events", backOff);
>
>         context = new DefaultCamelContext();
>         controller.setCamelContext(context);
>         context.setRouteController(controller);
>        ... the rest of the context initialization
>
> The first exception (when subscription is already taken)  is logged initially and I can see this right after it:
>
> 2020-08-20 14:20:49.732 [http-nio-8081-exec-4] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Start supervising route: jms-events with back-off: BackOff{delay=PT3S, maxDelay=PT30S, maxElapsedTime=PT2562047788015H12M55.807S, maxAttempts=100, multiplier=2.0}
> 2020-08-20 14:20:49.737 [http-nio-8081-exec-4] INFO  o.a.c.i.SupervisingRouteController - Total managed routes: 7 of which 6 successfully started and 1 re-starting
>
> Then, after 6 seconds:
>
> 2020-08-20 14:20:55.736 [Camel Thread #1 - Supervi] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Try to restart route: jms-events
> 2020-08-20 14:20:55.913 [Camel Thread #1 - Supervi] ERROR o.a.c.component.sjms.SjmsConsumer - Unable to create the MessageConsumer
> javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
>         at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:865)
>
> And then after another 12 sec:
>
> 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Try to restart route: jms-events
> 2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  o.a.camel.impl.DefaultCamelContext - Route: jms-events started and consuming from: sjms://topic:kt.mix.easybook.events?durableSubscriptionId=tire-lodge-dev
>
> But, It is not actually consuming anything - confirmed (subscription is still taken). Is it a bug or I'm missing something?
>
> Cheers,
> Dmitry
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Wednesday, August 19, 2020 10:03 PM
> To: users@camel.apache.org
> Subject: Re: SJMS2 durable subscription lazy re-connect
>
> Hi
>
> In Camel 3 there is a route controller you can use to configure Camel to restart the failing route up till X times.
> In Camel 2 that controller was implemented as an experiment so you may find it there and try to use it for 2.25.x
>
> On Wed, Aug 19, 2020 at 10:08 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
> >
> > Hi All,
> >
> > I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.
> >
> > When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
> > Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.
> >
> > Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?
> >
> > 2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR
> > o.a.c.component.sjms.SjmsConsumer - Unable to create the
> > MessageConsumer
> > javax.jms.IllegalStateException: Cannot create a subscriber on the
> > durable subscription since it already has subscriber(s) at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(
> > ActiveMQSession.java:865) at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSu
> > bscriber(ActiveMQSession.java:583)
> > at
> > org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSu
> > bscriber(ActiveMQSession.java:557)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscript
> > ionTopicConsumer(Jms2ObjectFactory.java:141)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMess
> > ageConsumer(Jms2ObjectFactory.java:97)
> > at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> > nsumer(Jms2ObjectFactory.java:72) at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> > nsumer(Jms2ObjectFactory.java:56) at
> > org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> > nsumer(Jms2ObjectFactory.java:42) at
> > org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsConsum
> > er.java:186) at
> > org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer.j
> > ava:47) at
> > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesF
> > actory.makeObject(SjmsConsumer.java:65)
> > at
> > org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesF
> > actory.makeObject(SjmsConsumer.java:56)
> > at
> > org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObject
> > Pool.java:1691) at
> > org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsCon
> > sumer.java:138) at
> > org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.java
> > :131) at
> > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> > at
> > org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelCon
> > text.java:3710) at
> > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumer
> > s(DefaultCamelContext.java:4028) at
> > org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(Defaul
> > tCamelContext.java:3963) at
> > org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(Def
> > aultCamelContext.java:3883) at
> > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(Defaul
> > tCamelContext.java:3647) at
> > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelCon
> > text.java:3488) at
> > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.j
> > ava:3247) at
> > org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.j
> > ava:3243) at
> > org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(Def
> > aultCamelContext.java:3266) at
> > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.
> > java:3243) at
> > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> > at
> > org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.ja
> > va:3159) at
> > org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache/c
> > amel/CamelContext.java) at
> > org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCa
> > melExtension.java:436) at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> > ava:62) at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> > orImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> > org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl
> > .java:348) at
> > org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(Cont
> > ainerEventObserverMethodImpl.java:84)
> > at
> > org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl
> > .java:313) at
> > org.apache.webbeans.event.NotificationManager.fireEvent(NotificationMa
> > nager.java:676) at
> > org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImp
> > l.java:490) at
> > org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanM
> > anagerImpl.java:485) at
> > org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidation
> > Event(BeansDeployer.java:736) at
> > org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:330
> > ) at
> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecy
> > cle.java:196) at
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSin
> > gletonServiceImpl.java:189) at
> > org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> > at
> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assem
> > bler.java:960) at
> > org.apache.openejb.assembler.classic.Assembler.createApplication(Assem
> > bler.java:754) at
> > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebA
> > ppBuilder.java:1303) at
> > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWeb
> > AppBuilder.java:1125) at
> > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalL
> > istenerSupport.java:133) at
> > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBas
> > e.java:94) at
> > org.apache.catalina.core.StandardContext.startInternal(StandardContext
> > .java:5134) at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
> > java:754) at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730
> > ) at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
> > at
> > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java
> > :1135) at
> > org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
> > java:1869) at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511
> > ) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> > ava:1149) at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> > java:624) at java.lang.Thread.run(Thread.java:748)
> > 2020-08-19 13:03:10.775 [localhost-startStop-1] INFO
> > o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1
> > (CamelContext: tire-lodge) is shutting down
> >
> > Cheers,
> > Dmitry
> >
>
>
> --
> Claus Ibsen
> -----------------
> https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXnDFm3jI$  @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaMnLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXlge_t6l$



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

RE: SJMS2 durable subscription lazy re-connect

Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
Thanks Claus.

I'm on v2.25.1 (TomEE + CDI) and didn't found any examples/docs about how to set the SupervisingRouteController, so here is what I did:

    @Produces
    @ApplicationScoped
    CamelContext customize() {
        SupervisingRouteController controller = new SupervisingRouteController();
        BackOff backOff = new BackOff();
        backOff.setDelay(Duration.ofMillis(3000));
        backOff.setMaxDelay(Duration.ofMillis(30000));
        backOff.setMultiplier(2.0);
        controller.setBackOff("jms-events", backOff);
        
        context = new DefaultCamelContext();
        controller.setCamelContext(context);
        context.setRouteController(controller);        
       ... the rest of the context initialization

The first exception (when subscription is already taken)  is logged initially and I can see this right after it:

2020-08-20 14:20:49.732 [http-nio-8081-exec-4] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Start supervising route: jms-events with back-off: BackOff{delay=PT3S, maxDelay=PT30S, maxElapsedTime=PT2562047788015H12M55.807S, maxAttempts=100, multiplier=2.0}
2020-08-20 14:20:49.737 [http-nio-8081-exec-4] INFO  o.a.c.i.SupervisingRouteController - Total managed routes: 7 of which 6 successfully started and 1 re-starting

Then, after 6 seconds:

2020-08-20 14:20:55.736 [Camel Thread #1 - Supervi] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Try to restart route: jms-events
2020-08-20 14:20:55.913 [Camel Thread #1 - Supervi] ERROR o.a.c.component.sjms.SjmsConsumer - Unable to create the MessageConsumer
javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:865)

And then after another 12 sec:

2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  o.a.c.i.SupervisingRouteController$RouteManager - Try to restart route: jms-events
2020-08-20 14:21:07.915 [Camel Thread #1 - Supervi] INFO  o.a.camel.impl.DefaultCamelContext - Route: jms-events started and consuming from: sjms://topic:kt.mix.easybook.events?durableSubscriptionId=tire-lodge-dev

But, It is not actually consuming anything - confirmed (subscription is still taken). Is it a bug or I'm missing something?

Cheers,
Dmitry

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Wednesday, August 19, 2020 10:03 PM
To: users@camel.apache.org
Subject: Re: SJMS2 durable subscription lazy re-connect

Hi

In Camel 3 there is a route controller you can use to configure Camel to restart the failing route up till X times.
In Camel 2 that controller was implemented as an experiment so you may find it there and try to use it for 2.25.x

On Wed, Aug 19, 2020 at 10:08 PM Shultz, Dmitry <Dm...@kaltire.com> wrote:
>
> Hi All,
>
> I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.
>
> When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
> Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.
>
> Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?
>
> 2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR 
> o.a.c.component.sjms.SjmsConsumer - Unable to create the 
> MessageConsumer
> javax.jms.IllegalStateException: Cannot create a subscriber on the 
> durable subscription since it already has subscriber(s) at 
> org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(
> ActiveMQSession.java:865) at 
> org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSu
> bscriber(ActiveMQSession.java:583)
> at 
> org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSu
> bscriber(ActiveMQSession.java:557)
> at 
> org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscript
> ionTopicConsumer(Jms2ObjectFactory.java:141)
> at 
> org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMess
> ageConsumer(Jms2ObjectFactory.java:97)
> at 
> org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> nsumer(Jms2ObjectFactory.java:72) at 
> org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> nsumer(Jms2ObjectFactory.java:56) at 
> org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageCo
> nsumer(Jms2ObjectFactory.java:42) at 
> org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsConsum
> er.java:186) at 
> org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer.j
> ava:47) at 
> org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesF
> actory.makeObject(SjmsConsumer.java:65)
> at 
> org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesF
> actory.makeObject(SjmsConsumer.java:56)
> at 
> org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObject
> Pool.java:1691) at 
> org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsCon
> sumer.java:138) at 
> org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.java
> :131) at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> at 
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelCon
> text.java:3710) at 
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumer
> s(DefaultCamelContext.java:4028) at 
> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(Defaul
> tCamelContext.java:3963) at 
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(Def
> aultCamelContext.java:3883) at 
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(Defaul
> tCamelContext.java:3647) at 
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelCon
> text.java:3488) at 
> org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.j
> ava:3247) at 
> org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.j
> ava:3243) at 
> org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(Def
> aultCamelContext.java:3266) at 
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.
> java:3243) at 
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> at 
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.ja
> va:3159) at 
> org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache/c
> amel/CamelContext.java) at 
> org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCa
> melExtension.java:436) at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:62) at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl
> .java:348) at 
> org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(Cont
> ainerEventObserverMethodImpl.java:84)
> at 
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl
> .java:313) at 
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationMa
> nager.java:676) at 
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImp
> l.java:490) at 
> org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanM
> anagerImpl.java:485) at 
> org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidation
> Event(BeansDeployer.java:736) at 
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:330
> ) at 
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecy
> cle.java:196) at 
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSin
> gletonServiceImpl.java:189) at 
> org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> at 
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assem
> bler.java:960) at 
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assem
> bler.java:754) at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebA
> ppBuilder.java:1303) at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWeb
> AppBuilder.java:1125) at 
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalL
> istenerSupport.java:133) at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBas
> e.java:94) at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext
> .java:5134) at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.
> java:754) at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730
> ) at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
> at 
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java
> :1135) at 
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.
> java:1869) at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511
> ) at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> ava:1149) at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:624) at java.lang.Thread.run(Thread.java:748)
> 2020-08-19 13:03:10.775 [localhost-startStop-1] INFO 
> o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1 
> (CamelContext: tire-lodge) is shutting down
>
> Cheers,
> Dmitry
>


--
Claus Ibsen
-----------------
https://urldefense.com/v3/__http://davsclaus.com__;!!LdWlNaMnLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXnDFm3jI$  @davsclaus Camel in Action 2: https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!LdWlNaMnLCM!MFMROMWFk7vw1WzlDsxG-l-HKIjSF69EKCqZUKMtF7TiuIEkD3bT1ZR-0HMOXlge_t6l$ 

Re: SJMS2 durable subscription lazy re-connect

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

In Camel 3 there is a route controller you can use to configure Camel
to restart the failing route up till X times.
In Camel 2 that controller was implemented as an experiment so you may
find it there and try to use it for 2.25.x

On Wed, Aug 19, 2020 at 10:08 PM Shultz, Dmitry
<Dm...@kaltire.com> wrote:
>
> Hi All,
>
> I'm migrating the service from camel-jms to came-sjms2 component (connecting to Artemis brokers) and it all good except of one change in behaviour which breaks the Kubernetes redeployment.
>
> When service app (helm) is redeployed using Ranched UI it brings the new service pod up, checks if it's up (readiness check) and shuts down the old one. When using the camel-jms the new service complained about not being able to create the durable subscription (because it is already taken by the running pod) but it didn't fail the deployment, so readiness check passes, old service is killed by the K8's and new service successfully reconnects later.
> Now, when sjms2 is used, the whole deployment (tomee) fails when durable subscription is not available, so readiness check never passes.
>
> Is there any way to make it behave like the old camel-jms, so the context is not shutdown when subscription is not available?
>
> 2020-08-19 13:03:10.773 [localhost-startStop-1] ERROR o.a.c.component.sjms.SjmsConsumer - Unable to create the MessageConsumer
> javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)
> at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:865)
> at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:583)
> at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:557)
> at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createSubscriptionTopicConsumer(Jms2ObjectFactory.java:141)
> at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createTopicMessageConsumer(Jms2ObjectFactory.java:97)
> at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:72)
> at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:56)
> at org.apache.camel.component.sjms2.jms.Jms2ObjectFactory.createMessageConsumer(Jms2ObjectFactory.java:42)
> at org.apache.camel.component.sjms.SjmsConsumer.createConsumer(SjmsConsumer.java:186)
> at org.apache.camel.component.sjms.SjmsConsumer.access$000(SjmsConsumer.java:47)
> at org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesFactory.makeObject(SjmsConsumer.java:65)
> at org.apache.camel.component.sjms.SjmsConsumer$MessageConsumerResourcesFactory.makeObject(SjmsConsumer.java:56)
> at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1691)
> at org.apache.camel.component.sjms.SjmsConsumer.fillConsumersPool(SjmsConsumer.java:138)
> at org.apache.camel.component.sjms.SjmsConsumer.doStart(SjmsConsumer.java:131)
> at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3710)
> at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:4028)
> at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3963)
> at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3883)
> at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3647)
> at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3488)
> at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3247)
> at org.apache.camel.impl.DefaultCamelContext$4.call(DefaultCamelContext.java:3243)
> at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3266)
> at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3243)
> at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
> at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3159)
> at org.apache.camel.CamelContext$$OwbNormalScopeProxy0.start(org/apache/camel/CamelContext.java)
> at org.apache.camel.cdi.CdiCamelExtension.afterDeploymentValidation(CdiCamelExtension.java:436)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:348)
> at org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:84)
> at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:313)
> at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:676)
> at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:490)
> at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:485)
> at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:736)
> at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:330)
> at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:960)
> at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:754)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1303)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
> at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5134)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
> at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1135)
> at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1869)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> 2020-08-19 13:03:10.775 [localhost-startStop-1] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 2.25.1 (CamelContext: tire-lodge) is shutting down
>
> Cheers,
> Dmitry
>


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