我使用socket = zmq.socket('pub');,当我调用socket.send(['hello','sub'])时,订户没有响应。但是,当我在setInterval函数中放置socket.send(['hello','sub'])时,订阅者会有响应。
sock.send(['hello', 'Sub']); // this line no response
setInterval(function(){
console.log('sending a multipart message envelope');
sock.send(['hello', 'Sub']); // this line has response!
}, 500);