0
votes

I am planning to use control bus feature in spring integration for managing inbound endpoints i.e. inbound file adapter,message driven adapter etc.

In order for control bus to work , adapter id is mandatory. I don't want to hard code the id. Is there a way to list all inbound adapters and get Id ?

1
how to use org.springframework.integration.annotation.Role in Spring Integration DSL. I tried using @Role annotation on IntegrationFlow bean, however when i queried for roleController.getRoles() and empty list was returned. @Role works with @ServiceActiviator and other Spring Integration java configuration but how to use it with Spring Integration DSL?Ganesh

1 Answers

0
votes

Inbound Channel Adapters are represented by the SourcePollingChannelAdapter. All message driven channel Adapters are MessageProducerSupport or MessageGatewaySupport.

You need to request BeanFactory.getBeansForType() for all those mentioned classes.

At the same time consider to use their common Lifecycle interface if you are going to deal only with their start()/stop() functions.

There is also RoleController to manage groups of lifecycles: http://docs.spring.io/spring-integration/docs/4.3.10.RELEASE/reference/html/messaging-endpoints-chapter.html#endpoint-roles