2

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.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Cristian Boariu
  • 9,603
  • 14
  • 91
  • 162

3 Answers3

2

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.

pra
  • 8,479
  • 2
  • 18
  • 15
1

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';
al.
  • 687
  • 3
  • 12
0

Solved: There is a jbossdb database:

delete  FROM jms_messages ;
Cristian Boariu
  • 9,603
  • 14
  • 91
  • 162