You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm having some problem with understanding this nodejs binding and make use of it.
First, in C#, reqsock.send twice throws an exception, because it violates the pattern.
In zeromq.js, however. all reqsock.send seem to be queued. They will be executed as soon as there is a connection. Then all responses will come in in reqsocket.on('message', ...).
If there's no server, a lot of requests may queue whose response (at some time in the future) is not important anymore and may in fact cause wrong behaviour.
How is this intended to work? Is there any way to clear the queue?
Thanks
The text was updated successfully, but these errors were encountered:
I am trying to understand this wrapper as well, but it would seem if you want the same behaviour as in c# you would socket.send(...) async twice, and monitor for socket.on('error', ...) messages.
See the _outgoing variable on how the queue is implemented in the JS portion. However it basically gets queued in libzmq itself pretty soon after it zeromq.js gets the message, regardless of connection state.
This is addressed as of 6.0.0-beta.1, which is a reimplementation that addresses a number of fundamental issues with the previous versions of this library. For more background see #189.
I'd like to encourage you to try out the beta version and feel free to leave feedback here or in a new issue.
Hi,
I'm having some problem with understanding this nodejs binding and make use of it.
First, in C#, reqsock.send twice throws an exception, because it violates the pattern.
In zeromq.js, however. all reqsock.send seem to be queued. They will be executed as soon as there is a connection. Then all responses will come in in reqsocket.on('message', ...).
If there's no server, a lot of requests may queue whose response (at some time in the future) is not important anymore and may in fact cause wrong behaviour.
How is this intended to work? Is there any way to clear the queue?
Thanks
The text was updated successfully, but these errors were encountered: