【问题标题】:How to use ChannelInterceptor to stop the execution flow in the Spring integrationSpring集成中如何使用ChannelInterceptor停止执行流
【发布时间】:2021-06-25 09:27:08
【问题描述】:

有 Spring 集成流程。这必须由用户在运行时手动停止,并且需要使用 ChannelInterceptor 来停止执行。这是基于 xml 的配置。

【问题讨论】:

    标签: spring-integration


    【解决方案1】:

    要停止流程,只需在端点上调用 stop() 即可,这是流程的开始。为特定的id 自动连接一个AbstractEndpoint 并调用它的stop()。如果您打算在ChannelInterceptor 或其他服务中执行此操作,这真的没关系。

    还有一种称为Control Bus 的常见模式,其中要发送的命令之一可能是上面提到的stop() 操作:https://docs.spring.io/spring-integration/docs/current/reference/html/system-management.html#control-bus

    【讨论】:

      猜你喜欢
      • 2016-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多