1 Reply Latest reply on Jan 25, 2008 10:00 AM by Adrian Brock

    Is it possible to have 2 MDB consume same JMS msg?

    Paul Park Newbie

      I have 2 clustered MDBs on separate JBoss AS deployed in /jboss-4.0.5.GA/server/all/deploy, let's call the servers M1 and M2. They are listening on 2 other clustered Jboss AS hosting a JBossMQ queue, let's call them Q1 and Q2. So, there are 4 total Jboss AS running concurrently, M1, M2, Q1 and Q2.

      1 JMS msg was put on the master node queue on Q1. Both M1 and M2 consumed the same message and did their business logic. How is that possible that 2 MDBs consume the same JMS message? I thought either one of M1 or M2 would consume JMS, but not both.

      In our setup, only one MDB has to do work. Is it possible to put the MDBs (ear file) on M1 and M2 in jboss-4.0.5.GA/server/all/deploy-hasingleton/jms or are there other solutions?

      Thanks.

        • 1. Re: Is it possible to have 2 MDB consume same JMS msg?
          Adrian Brock Master

           

          "ppt" wrote:

          1 JMS msg was put on the master node queue on Q1. Both M1 and M2 consumed the same message and did their business logic. How is that possible that 2 MDBs consume the same JMS message? I thought either one of M1 or M2 would consume JMS, but not both.


          It's not possible, so either they aren't the same message or the first delivery failed
          and it got redelivered, but to the other mdb.


          In our setup, only one MDB has to do work. Is it possible to put the MDBs (ear file) on M1 and M2 in jboss-4.0.5.GA/server/all/deploy-hasingleton/jms or are there other solutions?
          Thanks.


          Yes.