2
votes

In my spring boot rest controller, I'm using StreamBridge for sending a message to the rabbitMQ server with something like

streamBridge.send("consumer-in-0", "hello world");

Is there a way to do a send and wait the response ?

1
Late to the party, but did you get any response to that? - WiredCoder
Unfortunately no. - tweetysat

1 Answers

0
votes

Alright, as I said, late to the party, but there seems to be a way. simply you can make the producer synchronous, this can be done in application.properties as such:

spring.cloud.stream.kafka.bindings.functionName-out-0.producer.sync=true

The same configuration was originally working for the MessageChannel pre Spring cloud function, but as I understand the underlying functionality is already the same