简体   繁体   English

从死信频道重新发送消息

[英]Redelivering messages from dead letter channel

I can put the messages in dead letter queue if message re-delivery attempts fail. 如果邮件重新传递尝试失败,我可以将邮件放入死信队列。
How do I initiate re-delivery of archived messages in Dead Letter queue? 如何在Dead Letter队列中启动已存档邮件的重新传递?
Does Camel provide any solution for that? Camel是否提供任何解决方案?

As @sully6768 suggested - you can use Camel component handling the Dead Message redelivery for you (like JMS ). 正如@sully6768建议的那样 - 您可以使用Camel组件为您处理Dead Message重新传递(如JMS )。

However you can also define how many times the message will be attempted to send before Camel moves it to the Dead Letter Queue (BTW you can also define the time interval between the redelivery attempts). 但是,您还可以定义在Camel将其移动到死信队列之前尝试发送消息的次数(顺便说一下,您还可以定义重新传递尝试之间的时间间隔)。

errorHandler(deadLetterChannel("jms:queue:dead"))
    .maximumRedeliveries(3).redeliveryDelay(5000));

The DLQ is just another JMS destination. DLQ只是另一个JMS目的地。 Simply create an additional Camel route that is used to process messages from the DLQ. 只需创建一个额外的Camel路由,用于处理来自DLQ的消息。

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

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