I am new to Functional Binding. Previously, I was doing my producer and consumer transactions with the annotation approach as follows. I could not understand how to do the same operations using functional binding. Can someone explain to me? Please do not share links. I would appreciate it if you could show me an example, even if it is a small one.
Producer
```
private final MessageChannel outputChannel;
public ProducerImpl(@Qualifier(ProducerStream.OUTPUT) MessageChannel outputChannel) {
this.outputChannel = outputChannel;
this.genericSettings = genericSettings;
}
@Override
public void publishData(Data data) {
outputChannel.send(MessageBuilder.withPayload(data).build());
}
```
```
String OUTPUT = "dataOutput";
@Output(ProducerStream.OUTPUT)
MessageChannel outputChannel();
```
Listener
```
@StreamListener(ListenerStream.INPUT_DATA)
@Override
public void listenData(Data data) {
processService.processData(data);
}
```
```
String INPUT_DATA = "dataInput";
@Input(INPUT_DATA)
SubscribableChannel inputChannel();
```
application.yml
spring:
application:
cloud:
bindings:
dataOutput:
destination: data-topic
dataInput:
destination: data-topic