Spring Integration manually start/stop channel adapter via control bus

后端 未结 3 1934
长情又很酷
长情又很酷 2020-12-06 06:59

Is there anyway to manually start/init a channel adapter?

I have two pairs of inbound/outbound adapters in my context.xml and would like to decide at runtime which o

3条回答
  •  没有蜡笔的小新
    2020-12-06 07:21

    To achieve this, you need to first set the channel-adapter auto-startup property to false auto-startup="false" and then using control bus start/stop the adapter

    See here control bus example - https://github.com/spring-projects/spring-integration-samples/tree/master/basic/control-bus

提交回复
热议问题