Skip to content

Make ChannelInitializer as dependency bean in the AbstractConsumerEndpointParser #9931

Closed
@artembilan

Description

@artembilan

See more info in the spring-projects/spring-boot#44873.

The AbstractConsumerEndpointParser produces a ConsumerEndpointFactoryBean which has to be initialized when BeanFactory requests a bean type. If inputChannel is not present in the BeanFactory that leads to the problem.

Making the IntegrationContextUtils.AUTO_CREATE_CHANNEL_CANDIDATES_BEAN_NAME as dependency on such an endpoint bean definition should trigger the ChannelInitializer to be initialized. Therefore all the auto-create channel candidates will be created upfront.

Side task.

Revise IntegrationConfigUtils.autoCreateDirectChannel() to use registerSingleton() instead this this functionality is called at runtime from that ChannelInitializer.afterPropertiesSet().

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions