清除 jBoss DLQ
有谁知道如何从 jBoss 中清除 DeadLetterQueue? 当我启动 jBoss 时,它在: 处等待 4 分钟,
12:09:06,281 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
在: 处等待 4 分钟,
[DLQ] () Bound to JNDI name: queue/DLQ
我想我可能必须清除这个队列..但它不在 jBoss 内部...?
有人可以帮忙吗?
提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您找到的答案将从所有队列中删除消息,这并不总是可取的。
您还可以通过 jmx 完成相同的任务,方法是在 jboss.mq.destination:name=DLQ;service=Queue mbean 上调用removeAllMessages()。
或者您可以完全消除手动刷新 DLQ 的需要 - 在 conf/jboss-service.xml 中,将
86400000
添加到中。
元素。消息将在 1 天后过期。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.如果您要通过 SQL 解决该问题,至少要确保当时队列未绑定并将其限制为死信队列,如下所示:
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:
已解决:有一个jbossdb数据库:
Solved: There is a jbossdb database: