tj / axon

message-oriented socket library for node.js heavily inspired by zeromq
MIT License
1.5k stars 155 forks source link

push/pull where pullers pull upon demand #140

Open nacholibre opened 9 years ago

nacholibre commented 9 years ago

Hello, With the current API pullers pull without limit, I mean you can't control the pull process, the data is just accepted and flows in. Without this control is very hard to implement distributed workers, I have to use req rep.

I've hit the same problem with the zeromq node bindings. It will be great if one can pause and resume the pull process (like readable streams) or at least call socket.pull(function (msg) {}) or something like that.

I think pullers should pull messages whenever they need or I'm missing something obvious?