问题描述
我使用 seda 队列作为死信通道端点.如果网络关闭或其他应用程序关闭,它可以正常工作.
如果我重新启动自己的系统会发生什么?
我会在死信通道端点 SEDA 队列中丢失我的消息吗?
I am using seda queue as dead letter channel endpoint. It works fine if network is down or other application is down.
What will happen if I restart my own system?
Will I loose my messages in dead letter channel endpoint SEDA queue?
推荐答案
seda 端点不是可靠的消息解决方案,这意味着发送到 seda 目标的任何消息在发生故障/重启时都会丢失.如果 JMS 不是可用的解决方案,您将需要提供自己的持久性逻辑来提供消息恢复.
The seda endpoint is not a reliable message solution, meaning any messages sent to a seda destination are subject to loss in the event of a failure/restart. If JMS is not an available solution you will need to provide your own persistence logic to provide message recovery.
此外,鉴于 seda 端点是异步的,您必须确保在 DLQ 消息持久化后使用消息确认模式,以便您的 DLQ 生产者将收到成功或失败的通知,以确保可靠性.
Additionally, given that seda endpoints are asynchronous, you must ensure that a pattern of message acknowledgement is used post persistence of the DLQ message so your producer to the DLQ will be notified of success or failure to ensure reliability.
这当然是在使用 DLQ 时.您还可以使用持久性预处理器来存储要传递的消息,并且仅在传递失败时才删除它们.
This of course when using a DLQ. You could also use a persistence preprocessor that would store messages meant for delivery and only delete them in the case of a failure to deliver them.
这篇关于在 Camel 的 SEDA 队列中保留失败的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!