Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7946

Durable Subscriber pattern does not work with the external AMQ-7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.0
    • fuse-7.0
    • Camel, Fuse EAP
    • None
    • % %
    • Hide

      /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=messaging-remote-throughput:add(host=${external.broker.host}, port=${external.broker.port})
      /subsystem=messaging-activemq/server=default/remote-connector=netty-remote-throughput:add(socket-binding=messaging-remote-throughput)
      /subsystem=messaging-activemq/server=default/connection-factory=simple-remote-artemis-connection-factory:add(entries=[java:/jms/${eap.external.broker.simple.cf}],connectors=[netty-remote-throughput])

      Show
      /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=messaging-remote-throughput:add(host=${external.broker.host}, port=${external.broker.port}) /subsystem=messaging-activemq/server=default/remote-connector=netty-remote-throughput:add(socket-binding=messaging-remote-throughput) /subsystem=messaging-activemq/server=default/connection-factory=simple-remote-artemis-connection-factory:add(entries= [java:/jms/${eap.external.broker.simple.cf}] ,connectors= [netty-remote-throughput] )
    • Hide

      1. Start external AMQ-7 e.g.

      docker run --rm -ti -p 61617:61616 docker-registry.engineering.redhat.com/fuse-qe/jboss-amq-7:7.1.0
      

      2. Start Fuse on EAP
      3. Execute command to configure external pooledConnectionFactory for AMQ-7:

      mvn clean install -Ddeploy-rar.skip=false
      

      4. Wait for restarting EAP and execute command to deploy the application:

      mvn clean install -Pdeploy
      
      Show
      1. Start external AMQ-7 e.g. docker run --rm -ti -p 61617:61616 docker-registry.engineering.redhat.com/fuse-qe/jboss-amq-7:7.1.0 2. Start Fuse on EAP 3. Execute command to configure external pooledConnectionFactory for AMQ-7: mvn clean install -Ddeploy-rar.skip= false 4. Wait for restarting EAP and execute command to deploy the application: mvn clean install -Pdeploy

    Description

      The certified way how to connect to external AMQ-7 is documented in EAP 7.1 doc guide.

      When I deploy camel-jms application with durable subscriber pattern, I got following exception:

      08:24:41,587 INFO  [org.wildfly.extension.camel] (MSC service thread 1-2) Bound camel naming object: java:jboss/camel/context/durable-subscriber-pattern
      08:24:41,587 INFO  [org.wildfly.extension.camel] (MSC service thread 1-8) Camel context starting: durable-subscriber-pattern
      08:24:42,974 INFO  [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-8) Type converters loaded (core: 193, classpath: 2803)
      08:24:43,077 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-8) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
      08:24:43,078 INFO  [org.apache.camel.impl.HeadersMapFactoryResolver] (MSC service thread 1-8) Detected and using custom HeadersMapFactory: org.apache.camel.component.headersmap.FastHeadersMapFactory@1d365bf7
      08:24:43,235 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-8) Route: durable started and consuming from: jms://topic:input?clientId=client1&durableSubscriptionName=test
      08:24:43,237 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-8) Route: non-durable started and consuming from: jms://topic:input
      08:24:43,238 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-8) Total 2 routes, of which 2 are started
      08:24:43,239 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-8) Apache Camel 2.21.0.fuse-000055-redhat-2 (CamelContext: durable-subscriber-pattern) started in 1.770 seconds
      08:24:43,258 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 74) WFLYUT0021: Registered web context: '/camel-jms-durable-example' for server 'default-server'
      08:24:43,258 INFO  [org.wildfly.extension.camel] (ServerService Thread Pool -- 74) Add Camel endpoint: http://127.0.0.1:8080/camel-jms-durable-example
      08:24:43,271 INFO  [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "camel-jms-durable-example.war" (runtime-name : "camel-jms-durable-example.war")
      08:24:48,238 INFO  [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) JMS message listener invoker needs to establish shared Connection
      08:24:48,255 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:24:53,259 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:24:58,265 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=2, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:25:03,268 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=3, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:25:08,273 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=4, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:25:13,278 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=5, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      08:25:18,280 ERROR [org.apache.camel.component.jms.DefaultJmsMessageListenerContainer] (Camel (durable-subscriber-pattern) thread #1 - JmsConsumer[input]) Could not refresh JMS Connection for destination 'input' - retrying using FixedBackOff{interval=5000, currentAttempts=6, maxAttempts=unlimited}. Cause: This method is not applicable inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6
      ^C08:25:54,898 INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal
      08:25:54,903 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0006: Unbound messaging object to jndi name java:jboss/AMQ7RemoteXAConnectionFactory
      08:25:54,907 INFO  [org.wildfly.extension.camel] (MSC service thread 1-1) Unbind camel naming object: java:jboss/camel/context/durable-subscriber-pattern
      08:25:54,907 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 82) WFLYUT0022: Unregistered web context: '/camel-jms-durable-example' from server 'default-server'
      08:25:54,910 INFO  [org.jboss.gravia.runtime] (MSC service thread 1-1) Stopped: Module[gravia-container-wildfly-extension:1.3.1]
      08:25:54,910 INFO  [org.jboss.gravia.runtime] (MSC service thread 1-1) Uninstalled: Module[gravia-container-wildfly-extension:1.3.1]
      08:25:54,911 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 74) WFLYUT0022: Unregistered web context: '/hawtio' from server 'default-server'
      08:25:54,913 INFO  [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 81) WFLYMSGAMQ0006: Unbound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
      08:25:54,915 INFO  [io.hawt.HawtioContextListener] (ServerService Thread Pool -- 74) Destroying hawtio services
      08:25:54,921 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service thread 1-1) Apache Camel 2.21.0.fuse-000055-redhat-2 (CamelContext: durable-subscriber-pattern) is shutting down
      08:25:54,922 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (MSC service thread 1-1) Starting to graceful shutdown 2 routes (timeout 300 seconds)
      08:25:54,924 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0019: Host default-host stopping
      08:25:54,928 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 86) WFLYCLINF0003: Stopped client-mappings cache from ejb container
      08:25:54,952 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS]
      08:25:54,953 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) WFLYMSGAMQ0006: Unbound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
      08:25:54,953 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0011: Unbound JCA ConnectionFactory [java:/JmsXA]
      08:25:54,954 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0019: Stopped Driver service with driver-name = h2
      08:25:54,958 INFO  [org.apache.activemq.artemis.ra] (ServerService Thread Pool -- 86) AMQ151003: resource adaptor stopped
      08:25:55,682 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (Camel (durable-subscriber-pattern) thread #3 - ShutdownTask) Route: non-durable shutdown complete, was consuming from: jms://topic:input
      08:25:55,682 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (Camel (durable-subscriber-pattern) thread #3 - ShutdownTask) Route: durable shutdown complete, was consuming from: jms://topic:input?clientId=client1&durableSubscriptionName=test
      

      This is happening, because of using pooledConectionFactory from JCA resource adapter. We can instantiate our own connectionFactory, but as far as I know this is not the certified way.

      Are we going to support this scenario? If not, we should create a documentation for that.

      Attachments

        Issue Links

          Activity

            People

              jnethert@redhat.com James Netherton
              vkasala@redhat.com Viliam Kasala
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: