Discussion:
[jboss-user] [JBoss Messaging] - Reprocess DLQ
ansur
2013-03-13 14:51:20 UTC
Permalink
ansur [https://community.jboss.org/people/ansur] created the discussion

"Reprocess DLQ"

To view the discussion, visit: https://community.jboss.org/message/802383#802383

--------------------------------------------------------------
There have been some topics on removing messages from DLQ - which doesn't seem like something easy to accomplish with JMS.

The requirement that I have is that we need to enable users to reprocess a DLQ.
My current implementation boils down to the following snippet:

                final QueueBrowser browser = session.createBrowser(queue);
                final Enumeration<Message> jmsMessages = browser.getEnumeration();
               
                while(jmsMessages.hasMoreElements()) {
                    final Message jmsMessage = jmsMessages.nextElement();
                    final Destination destination = jmsMessage.getJMSDestination();
                   
                    sendMessage(jmsMessage, destination, session);
                }


I.e. create a browser, and for each message, get the destination and send it there. the sendMessage() method creates a MessageProducer and calls the send() method.

This is working fine, but the message isn't actually removed from the DLQ.
What behaviour would I need in order to have it removed after processing?

After all, if the message fails to process again, it would just en dup in the DLQ again - which is OK.

Finally, the above is part of a manual action. So I can't just register an MDB on the DLQ - it needs to be a manual invocation.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802383#802383]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
Ranajit Jana
2013-03-13 15:58:19 UTC
Permalink
Ranajit Jana [https://community.jboss.org/people/ranajitjana] created the discussion

"Re: Reprocess DLQ"

To view the discussion, visit: https://community.jboss.org/message/802406#802406

--------------------------------------------------------------
Is there a possibilty that as soon as you are placing it in the actual queue it is failing and coming back to DLQ ?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802406#802406]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
ansur
2013-03-13 16:00:01 UTC
Permalink
ansur [https://community.jboss.org/people/ansur] created the discussion

"Re: Reprocess DLQ"

To view the discussion, visit: https://community.jboss.org/message/802407#802407

--------------------------------------------------------------
Good point, but no, I verified that.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802407#802407]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
Loading...