-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribe examples #1
Comments
@sshilko Please check the subscribe and console example. |
@stackerzzq thx, this library looks good and probably the ONLY one working with react/event-loop. Meanwhile i had to write my own adapter for NSQ server (i had one for Beanstalkd) with compatible interface. I really liked the code, few comments
What if user's callback takes more time than allowed by server, would be good to allow to do TOUCH initiated by user or to know how much time left. And overall nsq has launch options like --max-req-timeout=48h0m1s or --max-heartbeat-interval=2m0s - taking them into account would be nice (i.e. passing as server-configuration for client validation if someone tries to connect with hearbeat > server.max.hearbeat) As far as i understood you have only one loop (react) running waiting to receive messages and then blocking callback to execute user handler is called upon receiving valid message. And plus some more timers/loops can be added alongside (addPeriodicTimer). So technicly not to have blocking handler, i can setup timer with ±MIN_INTERVAL that will actually process messages instead of user's callback and have small queue between two loops. Anyway this code looks really good and extendable, you should apply to be listed on http://nsq.io/clients/client_libraries.html I'm stuck in production for now with my own blocking implementation but if would used the event loop, the result will look really similar. |
@sshilko ok, nice comments. I will make it better. |
Hello, project looks interesting, can you update simple subscribe examples and document it a bit.
Thx
The text was updated successfully, but these errors were encountered: