DLQ、直到成功和例外
我正在使用直到成功来重试连接几次,在我的重试策略已用尽的情况下,我想优雅地记录错误(不引发异常)。 我尝试过使用默认异常策略,如下所示:
<until-successful objectStore-ref="objectStore"
deadLetterQueue-ref="ErrorHandler" maxRetries="${TMSService.numOfRetries}"
secondsBetweenRetries="${TMSService.retrySecInterval}">
<outbound-endpoint address="${TMSService.host}" />
</until-successful>
<default-exception-strategy>
<vm:outbound-endpoint path="ErrorMsgs" />
</default-exception-strategy>
但是仍然无法捕获该异常,处理此问题的正确方法是什么?
谢谢 谢谢
I am using until-successful in order to retry a connection several times, in the case of me the retry policy being exhausted, i would like to log the error gracefully (without raising an exception).
I've tried using a default-exception-strategy, like so:
<until-successful objectStore-ref="objectStore"
deadLetterQueue-ref="ErrorHandler" maxRetries="${TMSService.numOfRetries}"
secondsBetweenRetries="${TMSService.retrySecInterval}">
<outbound-endpoint address="${TMSService.host}" />
</until-successful>
<default-exception-strategy>
<vm:outbound-endpoint path="ErrorMsgs" />
</default-exception-strategy>
But that still wont catch that exception, what would be the correct way to handle this?
Thanks
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直到成功的消息处理器不会抛出异常(除非出现技术问题,可能与其对象存储有关),并阻止它将消息排入队列以进行传递。
如果您想找出导致上次传递错误的异常,您应该在分派到 DLQ 端点的 MuleMessage 的异常负载中找到 。
The until-successful message processor doesn't throw exceptions (unless a technical issue, maybe with its object store), prevents it to enqueue the message for delivery.
If you want to find out the exception that caused the last delivery error, you should find at in the exception payload of the MuleMessage that gets dispatched to your DLQ endpoint.