Replace ZMQ(router/dealer) to NNG in raw mode problem #1791
-
i want to replace zmq by nng in my project and in which there are more than one number of dealers where i want to send the message. Can it be possible to replace zmq. and if it is possible then please provide the document of nng raw mode. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
You probably don't need to use raw mode. You can use nng_device() to build these kinds of configurations. You only need raw mode if you want to have more direct control over the routing. The details of the raw mode are specified ind the documentation. Please see for example the documentation for REQ in nng_req.7 |
Beta Was this translation helpful? Give feedback.
-
i want to work on nng(router/dealer) . can i done by nng_device. |
Beta Was this translation helpful? Give feedback.
-
The "nng_device()" function creates a router/dealer type configuration. Please see the documentation for it. The code is fairly straight-forward as well -- although be advised that it is just a very simple proxy, as it does not know how (for example) to select different peers -- the individual sockets that are connected will each still use their normal modes of distribution. (E.g. round robin for REQ/REP, broadcast for PUB, etc.) |
Beta Was this translation helpful? Give feedback.
-
int ZMQGateway::zmqReceiverThread() {
........................... now this is the second code int NNGGateway::nngReceiverThread()
} |
Beta Was this translation helpful? Give feedback.
You probably don't need to use raw mode.
You can use nng_device() to build these kinds of configurations. You only need raw mode if you want to have more direct control over the routing.
The details of the raw mode are specified ind the documentation. Please see for example the documentation for REQ in nng_req.7