3 Replies Latest reply on Oct 9, 2006 5:13 AM by mskonda

    Regarding message persistence

    magnus ehdwall Newbie

      I am trying to setup MySQL as a persistent store for my messages. It all seems to work fine; the correct tables are created at startup etc.
      However, shouldn't I be able to to see the messages I send in the database aswell? Or have I gotten this entirely wrong? The table 'jms_counter' is updated with new data each startup, but the table 'jms_message' is never updated at all, even after I send a lot of messages.

        • 1. Re: Regarding message persistence
          mskonda Apprentice

          Possible anwers:

          - you may have a client who's consuming them (if a message is consumed, resepctive rows are deleted)
          - you may have non-persitence messages sent
          - you may be sending to a topic where no listeners exist (the messages aren't persited unless there's a current subscriber or durable subscriber exists

          Thanks
          Madhu

          • 2. Re: Regarding message persistence
            magnus ehdwall Newbie

            Thank you for your time Madhu.

            The messages sent are persistent, the following is the rest of my setup:

            A client (MessageProducer) publishing (sending) 1000 messages to a specific topic, a MessageDrivenBean registered to that topic and subscriptionDurability set to durable. In my MDB:s onMessage method a do a pause so that it does not read all messages at once.

            When all messages have been sent but only about half of them read I kill the application, shouldn't the messages that have not been read be in the database then? So that the subscriber can receive them when the app restarts? At least, that is the kind of safety I'd like in my application.

            Thanks


            • 3. Re: Regarding message persistence
              mskonda Apprentice

               

              "busawreck" wrote:

              When all messages have been sent but only about half of them read I kill the application, shouldn't the messages that have not been read be in the database then? So that the subscriber can receive them when the app restarts? At least, that is the kind of safety I'd like in my application.


              Yes, the messages should be available on client-reconnection as a duable subscription has been set up earlier.

              However, did you check that you are using a single-mdb? If you are not using singleton-mdb configuration (which instantiates one-and-only-one mdb), hgh likely that your messages may be consumed by other instances too.

              /Madhu