Question

Does anyone know how to clear DeadLetterQueue from jBoss? When i start jBoss, it is waiting 4 minutes at:

12:09:06,281 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'

and other 4 min at:

 [DLQ] () Bound to JNDI name: queue/DLQ

and i think that probably i have to clear this queue..but it is not inside jBoss...?

Can anybody give a hand of help?

thanks in advance.

Was it helpful?

Solution

The answer you found will remove messages from all queues, which is not always desirable.

You can also accomplish the same via jmx, by invoking removeAllMessages() on the jboss.mq.destination:name=DLQ;service=Queue mbean.

Or you can eliminate the need to manually flush your DLQ at all -- in conf/jboss-service.xml, add <TimeToLive>86400000</TimeToLive> to the <DLQConfig> element. That will expire messages after 1 day.

OTHER TIPS

If you're going to solve it via SQL, at least make sure the Queues are unbound at the time and restrict it to the Dead Letter Queue like so:

delete from jms_messages where destination = 'DLQ';

Solved: There is a jbossdb database:

delete  FROM jms_messages ;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top