I have a small problem and I’ve figured out where when and why it happens but I got no idea how to fix it. The problem is the following :
I have jms:outbound-channel-adapter, gateway and direct channel. And between ConsumerEndpointFactoryBean initialized my adapter and lifecycle activated endpoint I receive a message. So it caused org.springframework.integration.MessageDeliveryException: Dispatcher has no subscribers
How can I tell my sender bean wait endpoint been activated?
Implement SmartLifeCycle and return a phase of Integer.MAX_VALUE. Then, your bean will one of the last to be initialized (CEFB has a phase = 0).