1 Reply Latest reply on Sep 21, 2005 2:16 PM by genman

    Recovering Messages from DLQ

    davewebb

      I am running JBoss 4.0.2 on Linux using Oracle as my JMS Persistence layer.

      I use JMS to asynchronously send email alerts from my application. In some cases, the SMTP server is unavailable to send out the message and JMS properly puts them in QUEUE.DLQ.

      My question is this:

      Once my SMTP server is available again, how do I can I tell my MDB to go and reprocessing the messages?

      I have tried updating the table and changing the QUEUE from QUEUE.DLQ to QUEUE.emailSenderQueue (this regular queue name for sending the messages). After that, the MDB will process NEW messages within that queue, but not the ones I updates from QUEUE.DLQ. To make it more interesting, if I restart Jboss then all messages get processed upon startup, even then ones I updated from QUEUE.DLQ.

      Clear as mud?

      Is there a particular Bean I can restart in the JMX console that will emulate the application restart, but only for that MDB?

      Thanks in advance!

        • 1. Re: Recovering Messages from DLQ
          genman


          Dave,

          Although you can modify the JMS data in the database itself, it's probably not recommend.

          You should write an MDB or something (MBean?) that reads messages from the DLQ and then sends them to the original queue.

          If you would like this sort of thing build into JBoss, we've been talking about message lifecycle in the developer forums.