Currently most of the logic of the producer I/O thread is in Sender.java.
However we will need to do a fair number of similar things in the new consumer. Specifically:
- Track in-flight requests
- Fetch metadata
- Manage connection lifecycle
It may be possible to refactor some of this into a helper class that can be shared with the consumer. This will require some detailed thought.