title: How to match responses to requests in Netty client?
body: <p>I'm implementing a http client app with Netty. The task is to send the same request to several endpoints and collect the answers for further processing. Many such requests can be sent concurrently to the same endpoints. The problem is to match responses received from one endpoint to requests.</p>
  
  <p>One possible solution is to create a new handler (and pipeline) for each request as describe here <a href="https://stackoverflow.com/a/7905761/4926576">https://stackoverflow.com/a/7905761/4926576</a>. In this case request can be mapped to handler and handler can store the response. But this means creating new connection for each request which will degrade the performance.</p>
  
  <p>I also don't want to change the protocol and include request ids in requests/responses only for the purpose of matching.</p>