4 Replies Latest reply on Jun 25, 2003 8:36 PM by rkbeach

    MDB -- Not Consuming Mesgs...

    rkbeach Newbie

      Hi All,

      I am using JB 3.0.4

      I have created two topics...not temporary ones...
      created these topics by modifying the deploy/jbossmq-destinations-service.xml

      I have created two MDB's -- with Durable Subscription...made relevant entries in ejb-jar.xml (specifying that it's a durable subscriber) and in jboss.xml (specified the mdb-subscription-id...and modified the conf/jbossmq-state.xml such that it
      has the same clientId, and also specified the destination)

      When I publish mesgs to the two topics without deploying the beans as yet...I see in the log file that the mesgs are being persisted (I have opted for rollinglogged Persistence mechanism). But, when I DEPLOY the MDB's after say 20 mesgs have been published, the MDB's are NOT getting those mesgs that have been published BEFORE they were deployed...

      I thought with durable subscription, the MDB, after
      it's deployed, should be able to get the mesgs...

      I specified that the Mesg time to live as 9 mins...and am deploying the MDB's within that time frame...so, the mesgs have not expired...

      The one thing I have not done is, specify the 'mdb-user', 'mdb-password' attributes in the jboss.xml file for the 2 MDB's...

      Could anyone please let me know where I might
      have gone wrong? or is my understanding of the
      way MDB's work is totally flawed?

      Thanks much,

        • 1. Re: MDB -- Not Consuming Mesgs...
          Adrian Brock Master

          To make durable subscriptions work properly,
          you need to supply a user id and subscription name.

          Otherwise, you will see subscriptions with
          anonymous users like ID:4 in jbossmq-state.xml
          Which don't work across redeployments.

          However since you are getting some messages,
          your problem is elsewhere. Do you see the same
          problem with JBoss 3.0.8?


          • 2. Re: MDB -- Not Consuming Mesgs...
            rkbeach Newbie

            Hi Adrian,

            Thanks much for the reply...

            I will try with 3.0.8 or 3.2.1 and see what happens...

            Also, will use a userid in the jboss.xml for these
            MDB's before I go ahead and try with 3.0.8 and
            3.2.1...will let you know if that fixed the problem...

            One quick question though...when I use the
            rolling persistence, even when the beans are
            deployed, mesgs are being persisted, not consumed by the MDB's...do you think that's because I am not using the userid in the deplyoment descriptor? only when I use file persistence, mesgs are being consumed.

            Thanks much,

            • 3. Re: MDB -- Not Consuming Mesgs...
              Adrian Brock Master

              I'm not familiar with the rolling logged pm.
              File is the default in 3.0
              JDBC2 in 3.2


              • 4. Re: MDB -- Not Consuming Mesgs...
                rkbeach Newbie

                Hi Adrian,

                I was able to get the problem resolved after using the userid in the deployment descriptor for both the
                MDB's. Now, Durable Subscriptions work!!!

                Thanks much for all your help...

                Rolling Logged PM is something I came across after
                looking at a thread here, regarding persistence...I
                believe it would help roll over the messages every
                day...for your info...the thread is,

                http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= much again...for all your help.