Hey all, I'm working on https://github.com/cainus/Prozess, which is a 
client library for Kafka and I'm looking to try to implement some sort of 
auto-reconnect capability.

What are the usual strategies for that with regards to handling additional 
writes while the client reconnects?

I was thinking about 2 ways to handle when app code tries to write while 
the client is reconnecting:
(A) immediately return a "reconnecting" error in my callback so that app 
code can know that it can retry shortly.
OR
(B) continue to take new writes from the app code, but just make them wait 
for the reconnect, and fail each of them if a single reconnect attempt fails

I'd like to ensure a reliable write either way, so I'm not considering 
solutions like "just queue up the write data until it can be sent".

Does anyone have a better third option, or recommendation on one of these 
above?  Is there a standard way that other libraries are doing this?

Thanks!

G

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to