2 Replies Latest reply on May 31, 2006 5:29 AM by smitadd

    Messages do not get deleted from topic, even after being con

    smitadd

      I am creating one topic and pushing some messages in the topic , the messages are then consumed by an MDB which is durable subscriber.
      All this works fine uptill i dont restart the server.

      But when the JBOSS server is restarted, then all the messages that were pushed into the topic earlier before restart, again gets consumed by my MDB. that means that the JBOSS is not deleting the messages from topic and after restart all the messages are resent to its subscriber.

      Is there some way of deleting the messages as soon as it gets consumed by my durable topic. I have only one durable subscriber.

      thanks for any help in advance :-)

        • 1. Re: Messages do not get deleted from topic, even after being
          jaikiran

          Whats the acknowledgement mode specified on the session. Usualy, it is AUTO_ACKNOWLEDGE. Looks like the message consumption is NOT being acknowledged leading to re-delivery of the message

          • 2. Re: Messages do not get deleted from topic, even after being
            smitadd

            Hi jaikiran

            The acknowledge mode is set to AUTO_ACKNOWLEDGE only

            this is the code from my ejb-jar.xml of MDB

            <message-driven>
            <ejb-name>LogTopicMDB</ejb-name>
            <ejb-class>com.mobio.srv.logging.mdb.LogTopicMDB</ejb-class>
            <transaction-type>Container</transaction-type>
            <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
            <message-driven-destination>
            <destination-type>javax.jms.Topic</destination-type>
            <subscription-durability>Durable</subscription-durability>
            </message-driven-destination>
            <resource-ref>
            <res-ref-name>jms/TCF</res-ref-name>
            <res-type>javax.jms.TopicConnectionFactory</res-type>
            <res-auth>Container</res-auth>
            </resource-ref>
            </message-driven>


            I m using jboss 4.0.3SP1
            thx