I defined error
and notification
bindings in application.yml
cloud:
stream:
bindings:
error:
destination: error
binder: default
notification:
destination: notification
binder: default
How can i get those beans in my components?
I tried this approach:
@Component
class MyComponent {
@Autowired
@Qualified("notification")
MessageChannel notificationChannel;
}
But notificationChanel
is not found.
Update
cloud.stream.bindings.*
allow only configure channels. But does not create it.
Are you sure that you have @EnableBinding
and appropriate interface to declare @Input
or @Output
?
public interface Barista {
@Input
SubscribableChannel orders();
@Output
MessageChannel hotDrinks();
@Output
MessageChannel coldDrinks();
}
...
@EnableBinding(Barista.class)
public class CafeConfiguration {