我正在尝试编写一个脚本,从activeMQ队列中提取消息并在之后清除它们 . 我尝试在线查找,但找不到任何示例来教我如何做到这一点 . 我想知道如何连接到DLQ以及如何清除它?有帮助吗?
提前致谢
DLQ就像任何主题或队列一样,您可以像任何主题或队列一样订阅它并消耗累积的消息 . 这是清单[http://activemq.apache.org/advisory-message.html][1]
如果您没有 individualDeadLetterStrategy ,则订阅它的DLQ的名称是 ActiveMQ.DLQ ,您订阅并使用onMessage方法开展业务 . [http://activemq.apache.org/message-redelivery-and-dlq-handling.html][2]
individualDeadLetterStrategy
ActiveMQ.DLQ
5.4的新建议 ActiveMQ.Advisory.MessageDLQd.* 可通过 org.apache.activemq.advisory.AdvisorySupport.getMessageDLQdAdvisoryTopic(ActiveMQDestination); 访问
ActiveMQ.Advisory.MessageDLQd.*
org.apache.activemq.advisory.AdvisorySupport.getMessageDLQdAdvisoryTopic(ActiveMQDestination);
1 回答
DLQ就像任何主题或队列一样,您可以像任何主题或队列一样订阅它并消耗累积的消息 . 这是清单[http://activemq.apache.org/advisory-message.html][1]
如果您没有
individualDeadLetterStrategy
,则订阅它的DLQ的名称是ActiveMQ.DLQ
,您订阅并使用onMessage方法开展业务 . [http://activemq.apache.org/message-redelivery-and-dlq-handling.html][2]5.4的新建议
ActiveMQ.Advisory.MessageDLQd.*
可通过org.apache.activemq.advisory.AdvisorySupport.getMessageDLQdAdvisoryTopic(ActiveMQDestination);
访问