Basically opening this ticket to track the feature/approach for the client.
Not sure if we need two threads, may need for concurrent PUB/MPUB support but for now most of the send ops can probably be done immediately. But anyway should have one thread that recieves messages and deals with heartbeat and all of that configuration stuff, then it pumps it into a queue in which it can monitor the high-water mark and adjust the RDY level for the client.
Then this should allow the library user to decide how they want to deal with the messages while letting the client deal with rdy, heartbeats, and all background stuff.
references:
http://www.yesodweb.com/blog/2014/03/network-conduit-async
https://github.com/informatikr/hedis
http://chimera.labs.oreilly.com/books/1230000000929/pt01.html
Basically opening this ticket to track the feature/approach for the client.
Not sure if we need two threads, may need for concurrent PUB/MPUB support but for now most of the send ops can probably be done immediately. But anyway should have one thread that recieves messages and deals with heartbeat and all of that configuration stuff, then it pumps it into a queue in which it can monitor the high-water mark and adjust the RDY level for the client.
Then this should allow the library user to decide how they want to deal with the messages while letting the client deal with rdy, heartbeats, and all background stuff.
references:
http://www.yesodweb.com/blog/2014/03/network-conduit-async
https://github.com/informatikr/hedis
http://chimera.labs.oreilly.com/books/1230000000929/pt01.html