3

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 ?

WiredCoder
  • 916
  • 1
  • 11
  • 39
tweetysat
  • 2,187
  • 14
  • 38
  • 75

1 Answers1

1

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

WiredCoder
  • 916
  • 1
  • 11
  • 39