【问题标题】:get list of spring integration inbound adapter获取 spring 集成入站适配器列表
【发布时间】:2017-06-21 03:36:00
【问题描述】:

我计划在 Spring 集成中使用控制总线功能来管理入站端点,即入站文件适配器、消息驱动适配器等。

为了使控制总线工作,适配器 ID 是强制性的。我不想对 id 进行硬编码。有没有办法列出所有入站适配器并获取 Id ?

【问题讨论】:

  • 如何在 Spring Integration DSL 中使用 org.springframework.integration.annotation.Role。我尝试在 IntegrationFlow bean 上使用 @Role 注释,但是当我查询 roleController.getRoles() 并返回空列表时。 @Role 与 @ServiceActiviator 和其他 Spring Integration java 配置一起使用,但如何将它与 Spring Integration DSL 一起使用?

标签: spring spring-integration


【解决方案1】:

入站通道适配器由SourcePollingChannelAdapter 表示。所有消息驱动的通道适配器都是MessageProducerSupportMessageGatewaySupport

您需要为所有提到的课程请求BeanFactory.getBeansForType()

同时考虑使用他们共同的Lifecycle接口,如果你只打算处理他们的start()/stop()函数。

还有RoleController 用于管理生命周期组:http://docs.spring.io/spring-integration/docs/4.3.10.RELEASE/reference/html/messaging-endpoints-chapter.html#endpoint-roles

【讨论】:

  • 谢谢阿特姆。我会试一试的。
猜你喜欢
  • 1970-01-01
  • 2015-03-21
  • 2015-07-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-04
  • 2014-12-07
  • 2023-03-21
相关资源
最近更新 更多