I am learning RabbitMq using spring cloud stream java. Having doubts in the mq configuration.
As per documents - spring.cloud.stream.bindings.>channelName>.destination=dest1
I am using below configuration and it's working-
spring.cloud.stream.bindings.input.destination=dest1
But if I mention my channel name in place of input like below, it's not working - spring.cloud.stream.bindings.myChannel.destination=dest1
In my class - @INPUT('myChannel')
My doubt is why is it not working when I mention the channelName given in class and
But it is working when I give default as .input. ..?
UPDATE
MyInterface.java
String CHANNEL = myChannel;
@INPUT(CHANNEL )
SubscribableChannel subs();
MyListener.java
@StreamListener(MyInterface.CHANNEL)
public void queueMsg(String str) {
System.out.println("Str msg = "+str);
}
application.prop
#Below property working fine
spring.cloud.stream.bindings.input.destination=dest1
spring.cloud.stream.bindings.input.binder=rabbit
#Below property NOT working
#spring.cloud.stream.bindings.myChannel.destination=dest1
#spring.cloud.stream.bindings.myChannel.binder=rabbit