2 Replies Latest reply on Feb 13, 2002 11:46 AM by Kurt Kremer

    DLQ  and JMS 101?

    Kurt Kremer Newbie

      I am liking the DLQ capability in 2.4.4, but I can't seem to write a client that allows me to dispense with the messages that appear in the queue/DLQ. I have a topic-based system using MDB's to write information in a database. If the database is unavailable, I want the messages to go to the DLQ until an administrator can "fix" the database. Then I want to use some "admin" client to deal with the items in the DLQ.

      While running my client - based on the JMS tutorial http://java.sun.com/products/jms/tutorial/1_3-fcs/examples/simple/SimpleQueueReceiver.java

      I receive new messages that appear in the queue, but all the messages that were there prior to me starting my client, get chucked without being delivered to me.

      I am using the file persistence manager (not rolling log).
      Can anyone point out any fundamental flaws in the idea?


        • 1. Re: DLQ  and JMS 101?
          Peter Antman Expert

          That sounds really strange...


          • 2. Re: DLQ  and JMS 101?
            Kurt Kremer Newbie

            Strange indeed, in the code, if I increase the receive call timeout from 1 to say, 2000, I can perform a directory listing during the run and watch the individual files in the queue directory disappear, one by one, without any of them being delivered to me.

            while (true) {
            Message m = queueReceiver.receive(1);
            if (m != null) {
            System.out.println( "got message" );
            if (m instanceof TextMessage) {
            message = (TextMessage) m;
            System.out.println("Reading message: " +
            } else {