简体   繁体   English

在JMS,ActiveMQ和SimpleMessageListenerContainer设置中,最后一次重试后如何检索消息?

[英]How to retrieve message after last retry in a JMS, ActiveMQ and SimpleMessageListenerContainer setup?

I have a Spring JMS, ActiveMQ setup where I use SimpleMessageListenerContainer which I associated with POJO message listener. 我有一个Spring JMS,ActiveMQ设置,在其中使用与POJO消息侦听器关联的SimpleMessageListenerContainer。 I have defined a RedeliveryPolicy where if there are exceptions in POJO message listener the message is send to DLQ after 4 tries. 我定义了RedeliveryPolicy,其中如果POJO消息侦听器中有异常,则在4次尝试后将消息发送到DLQ。 I would like to have access the message after the retries are exhausted, is it possible to with SMLC? 重试用尽后,我想访问该消息,SMLC是否可以? What about DefaultMessageListenerContainer? 那DefaultMessageListenerContainer呢?

You need another container listening on the DLQ. 您需要另一个容器来监听DLQ。

Or you can use JmsTemplate.receive() on the DLQ to get them on-demand. 或者,您可以在DLQ上使用JmsTemplate.receive()来按需获取它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM