Skip to content

@StreamListener is not visible when outside main Application class of Spring Boot. What could be the reason?

This is Spring Cloud Stream application. As i mention in the title, the StreamListener annotation works when inside the SpringBootApplication main class, but not when it resides in a different class with @Component annotation.

I believe it is some sort of StreamListener visibility issue.

I am publishing messages from the RabbitMQ management interface.

Below is the exception i get:

ERROR 10676 --- [Service-Group-1] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'Consumer-Slide.slideInputStream'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers

public class ConsumerApplication {
    public static void main(String[] args) {, args);

public interface SlideChannel {
    String slideInputStream = "slideInputStream";
    SubscribableChannel slideInput();

public class SlideListener {
    private SlideChannel slideCh;
    private SlideService slideService;
    public void getSingleSlideDetails(Message<?> messageId) {
            System.out.println("Message consumed");


I can answer myself since the Application works as expected.

Solution: Keep the Application file in the parent package so it can scan the child modules.(as I understand it).