6 Replies Latest reply on Jul 19, 2015 5:58 PM by ozkin

    ConcurrentConsumers for Camel-JMS binding

    ozkin

      When I set "concurrentConsumers" attribute of Camel-JMS service binding to a value more than 1, I get following error during application deployment.

       

      HQ154002: Could not create session: javax.jms.IllegalStateException: Only allowed one session per connection. See the J2EE spec, e.g. J2EE1.4 Section 6.6

       

      So, is it possible to have more than 1 concurrent consumer of JMS queue in SY?

       

      SY version is 1.1.0-final.

        • 1. Re: ConcurrentConsumers for Camel-JMS binding
          igarashitm

          Are you using JCA adapter? There seems to be a restriction to have only one session per connection in JCA, and I couldn't find a way to let spring-jms (which is used by camel-jms under the cover) create dedicated connection for each session. You may want to use JCA binding instead.

          1 of 2 people found this helpful
          • 2. Re: ConcurrentConsumers for Camel-JMS binding
            ozkin

            That's a bit unfortunate that option exists (I mean concurrentConsumers) but cannot be used as designed

             

            Hm, I don't know if I use JCA adapter. In this test I use pretty default setup of JBoss EAP with HornetQ + SY + my app with Camel JMS binding...

             

            Are you saying that using JCA binding (instead of Camel-JMS) I will be able to process incoming JMS messages concurrently? Is it possible to handle them in InOnly fashion?

            Maybe then I have to look at JCA binding, again...

            • 3. Re: ConcurrentConsumers for Camel-JMS binding
              igarashitm

              Yes JCA inbound (which follows JCA message inflow manner) runs concurrently.

              • 4. Re: ConcurrentConsumers for Camel-JMS binding
                ozkin

                Ok. I will have a look at JCA binding.

                 

                Still question to others if anyone ever was able in SY to consume JMS messages concurrently using Camel-JMS binding?

                • 5. Re: ConcurrentConsumers for Camel-JMS binding
                  ozkin

                  I tried to build a very simple app with JCA JMS binding. But deployment fails with the following error:

                   

                  22:42:50,696 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015870: Deploy of deployment "switchyard-try-jca-jms-0.0.1-SNAPSHOT.war" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"switchyard-try-jca-jms-0.0.1-SNAPSHOT.war\".SwitchYardService is missing [jboss.ra.hornetq-ra]"]}

                   

                  Any ideas how to fix it?

                  I am starting JBoss with standalone-full.xml.

                   

                  I've also build quickstart-jca-inflow-hornetq, but its deployment fails with the same error. Maybe there is some issue with my JBoss installation/configuration....

                  • 6. Re: ConcurrentConsumers for Camel-JMS binding
                    ozkin

                    It seems the issue was with my standalone configuration. I took the original configuration from the distribution and quickstart example worked fine.

                    So, I changed my app to use JCA JMS binding. It was working fine. But I noticed that after intensive testing (many messages sent) and after some idle time, JBoss reported following error (multiple times):

                     

                    00:32:31,811 WARN  [org.hornetq.core.client] (hornetq-failure-check-thread) HQ212037: Connection failure has been detected: HQ119014: Did not receive data from /127.0.0.1:58444. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=CONNECTION_TIMEDOUT]

                     

                    Any ideas why is that?

                    It was shown only after I started using JCA/JMS. And I have no other clients using JCA or HornetQ other than the binding itself..