title: Using Kafka in a resquest/response scenario inside a REST web service
body: <p>I am currently building a REST web service that needs to communicate with Kafka in a request/response pattern. (I know that Kafka is not really designed for that). </p>
  
  <ol>
  <li>Client calls the REST web service.</li>
  <li>REST web service publishes a message to Kafka</li>
  <li>On the other side of Kafka, an app consumes the message and publishes the response back to Kafka</li>
  <li>(inside the same request as #2)REST web service listens to Kakfa and wait for response corresponding to the request</li>
  <li>REST web service returns the response to the client</li>
  </ol>
  
  <p>Steps 1 to 3 seems pretty easy but I'm struggling with step 4. </p>
  
  <p>My idea was to propagate an ID in each message so that I could retrieve the response corresponding to the request.</p>
  
  <p>However, I have a hard time figuring out how to set up the listener on the REST web service. How can the listener returns the message to the controller?</p>