title: Spring Cloud Stream - Send message synchronously with wait time
body: <p>i am using Spring stream @StreamListener to send message synchronously where the consumer will hit the Rest end point and the message will be posted to Kafka.</p>
  <p>I can able to achieve the sync by using spring.cloud.stream.kafka.default.producer.sync=true but when the Kafka is down, the Timeout Exception not occurring so the consumer waiting for ~2 min.
  i tried to set max.block.ms as well but it didn't work for me. Below is the configuration.</p>
  <pre><code>spring.cloud.stream.kafka.default.producer.sync=true
  spring.cloud.stream.kafka.default.producer.configuration.max.block.ms=5000
  spring.cloud.stream.binders.test.type=kafka
  spring.cloud.stream.binders.environment.spring.cloud.stream.kafka.binder.autoCreateTopics=false
  spring.cloud.stream.binders.environment.spring.cloud.stream.kafka.binder.brokers=localhost:9092
  spring.cloud.stream.binders.environment.spring.cloud.stream.kafka.binder.zkNodes=localhost:2181
  spring.cloud.stream.bindings.output.binder=test
  spring.cloud.stream.bindings.output.group=testgroup
  spring.cloud.stream.bindings.output.destination=topic1
  spring.cloud.stream.bindings.output.content-type=text/plain
  spring.cloud.stream.bindings.producer.header-mode=headers
  </code></pre>