【发布时间】:2012-07-23 15:44:03
【问题描述】:
我正在使用 Jboss AS 7.1.1,我需要查看 DLQ(死信队列)中的消息。
我尝试为它编写一个简单的 MDB:
@MessageDriven(messageListenerInterface = MessageListener.class, activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/queue/DLQ"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1") })
public class DLQMDB implements MessageListener{
public void onMessage(Message message) {
try {
process(message);
} ...
}
}
我编写了另一个引发错误的 MDB,因此消息将发送到 DLQ,但从未触发 DLQ MDB。
不知道是DLQ中没有消息还是MDB定义不正确。
我做错了什么?有没有其他方法可以在 DLQ 中查看消息(例如日志记录、管理界面)?
【问题讨论】: