0
votes

We have a requirement to consume data through kafka streams and send the output to rabbitmq channel. Is there an example available available similar to this ?

I tried this - https://github.com/spring-cloud/spring-cloud-stream-samples/blob/master/multibinder-samples/multibinder-kafka-rabbit/src/main/resources/application.yml

spring.cloud.stream.default-binder: kafka

but getting this - java.lang.IllegalStateException: The binder 'kafka' cannot bind a com.sun.proxy.$Proxy103

1

1 Answers

1
votes

There are some current limitations for mixing two different binding target types(KStream and MessageChannel in the same processor (StreamListener)). As a work around, you can have two StreamListener methods in the same application. One is the normal Kafka Streams processor in which you have an input KStream and an output KStream. The second StreamListener method is a multi binder scenario in which you are receiving from the Kafka topic and output to the Rabbit exchange. I think this should address the use case that you are describing above. Let us know if that works. We can add a sample application demonstrating this.