spring - 为什么 spring 集成中默认的 "errorChannel"是 "PublishSubscribeChannel"?

标签 spring error-handling spring-integration publish-subscribe

我发现“ 默认 “errorChannel”是一个 PublishSubscribeChannel”,但我无法理解 为什么 .我们可以使用直接 channel 吗?什么是缺点使用直接 channel 作为errorChannel 的入站 channel ?

[ https://docs.spring.io/spring-integration/docs/5.0.5.RELEASE/reference/html/configuration.html#namespace-errorhandler][1]

最佳答案

您可以使用您喜欢的任何 channel 类型覆盖默认错误 channel 。没有缺点。

订阅了日志处理程序的 Pub/Sub 只是默认设置。

关于spring - 为什么 spring 集成中默认的 "errorChannel"是 "PublishSubscribeChannel"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62382177/

相关文章:

java - 在 Java Spring Integration 中,变压器元素可以包含路由器功能吗?

java - Spring : IdempotentReceiverInterceptor can only be used on MessageHandlers?

java - Spring Integration AMQP - 消息偶尔未确认,需要超时吗?

java - bean 名称 ' ' 的 BindingResult 和普通目标对象都不能用作请求属性

java - 如果 Item Reader 不返回任何内容,如何跳过 Spring Batch block 中的 Item Writer?

java - 如何指定spring data jpa请求加载实体属性集合?

javascript - 对Chrome浏览器中的错误的 promise 和处理

java - 如何使用Spring boot jpa 1.11在mysql中实现第一个最大记录

php - 引用 - 这个错误在 PHP 中意味着什么?

java - Struts 2 当用户插入不存在的 Action 时该怎么办