4 Replies Latest reply on May 23, 2006 12:39 PM by bdecoste

    Throttling redelivery for Message-Driven POJOs

      I've combed through the documentation and forums for hours, but I can't seem to find an answer.

      How do I affect the retry period and redelivery timeout for a Message-Driven POJO? I understand how to do this for a JBossMQ queue defined in XML, but is there any equivalent for annotations?

      Also, is there any automagic way to reprocess MDPOJO messages out of the DLQ?

      Thanks,
      Jeff Schnitzer
      http://subetha.tigris.org/

        • 1. Re: Throttling redelivery for Message-Driven POJOs
          bdecoste

          No, there is not currently annotations for those config params. I've created a JIRA task: http://jira.jboss.com/jira/browse/EJBTHREE-567

          To auomatically process DLQ messages, you would have to deploy an MDB to handle dead messages.

          • 2. Re: Throttling redelivery for Message-Driven POJOs

             

            "bdecoste" wrote:
            No, there is not currently annotations for those config params. I've created a JIRA task: http://jira.jboss.com/jira/browse/EJBTHREE-567


            Thanks. If I created the a Queue with the same name using jboss-service.xml, would the POJO happily use the queue with the (correct) properties? Or would this just result in two attempts to create the same queue?

            To auomatically process DLQ messages, you would have to deploy an MDB to handle dead messages.


            Is there an abstraction that would let me determine that a) a DLQ message is a message-driven-pojo invocation and b) to actually invoke it (or put it back on the original queue)?

            I could write an MDB that looks for messages in the very specific format that they are implemented in today, but that format could change without notice, right?

            Thanks,
            Jeff Schnitzer
            SubEtha Mailing List Manager - http://subetha.tigris.org/

            • 3. Re: Throttling redelivery for Message-Driven POJOs
              bdecoste

              If you deploy a queue using *-service.xml, the MDPOJO will use that queue and will not attempt to create a temporary queue.

              If I understand your question correctly, you could use Message properties and a message selector to filter for specific types of messages. The Message creator would havwe to set these properties. This is part of the JMS API.

              • 4. Re: Throttling redelivery for Message-Driven POJOs
                bdecoste

                You can set the following parameters (shown with their defaults) with the @ActivationConfigProperty annotation. We are working on xml elements to override or augment these parameters.

                minPoolSize = 1;
                maxPoolSize = 15;
                keepAlive = 30000;
                maxMessages = 1;
                serverSessionPoolFactoryJNDI = "java:/StdJMSPool";
                providerAdapterJNDI = "java:/DefaultJMSProvider";
                reconnectInterval = 10000;

                useDLQ = true;
                dlq = "queue/DLQ";
                dlqMaxTimesRedelivered = 10;
                dlqTimeToLive = 0;
                dlqUser;
                dlqPassword;