1 Reply Latest reply on Apr 22, 2013 12:53 AM by igarashitm

    Multiple consumers for the same queue,

    puttime

      Is it possible to have multiple consumers for the same queue?

       

      I tried it, but I get an exception on the second one, while it's  *-jms.xml file is being deployed.

       

      The error is "Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.messaging.default.jms.queue.MyJMSQueue5 is already registered"

        • 1. Re: Multiple consumers for the same queue,
          igarashitm

          I think there are 2 things here - First, *-jms.xml file deploys JMS queue itself, so you can't deploy more than one with same name. 2nd, I guess you may be able to deploy multiple consumers against same queue, but then those consumer will race and you can't make sure which consumer will receive the message.

           

          Alternatively you can deploy just one consumer and route it to the subsequent services with camel route.

          1 of 1 people found this helpful