Tuesday, March 3, 2020

How to fix ZEROMQ ipc issue in windows 10 for node.js development?

i have a line to connect to the DEALER socket.

const responder=zmq.socket('rep').connect('ipc://filer.dealer.ipc');

when i run the app. the error comes up immediately

 this._zmq.connect(addr);
            ^
Error: Protocol not supported
    at exports.Socket.Socket.connect (C:\node\microservices\node_modules\zeromq\lib\index.js:519:13)
    at Object.<anonymous> (C:\node\microservices\zmq-filer-rep-cluster.js:26:39)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

obviously IPC is for Linux and Unix in process communication. windows did support this kind of communication too. however windows use INPROC instead.

after i changed my code as following, the error had been fixed and running

const responder=zmq.socket('rep').connect('inproc://filer.dealer.ipc');


No comments:

Post a Comment