title: Best way to pass messages between 2 different protocol routes connected to same client
body: <p>I have a http route <code>/checkout</code> which initiates a workflow process in Zeebe. The <code>checkout</code> route will return <code>200</code> response straight-away to calling client. Now, workflow will run for a while. So to push the response back to client after completion, I have a <code>/sse</code> separate route for <em>server-sent events</em>. Here, I will store all the client connection in a global <code>map</code>.</p>
  <p>My doubt is how do I find the exact client to send the response back through <code>sse</code> once?</p>
  <ul>
  <li>Example: Client <strong>A</strong> listening to <code>/sse</code> and calls <code>/checkout</code> endpoint which will return 200. The <code>/sse</code> has to return the response to client <strong>A</strong> after completion.</li>
  </ul>
  <p>Currently, I thought of using cookie to identify the client. Is there a better way?</p>