Months ago I was selecting .NET library to use for implementing ZeroMQ communication, and I was pretty confused with the fact that there are few libraries suggested at zeromq.org.
Meanwhile I've learned few things, so I'll share here. Someone may find this helpful. So let me ask myself:
What is the difference between NetMQ and clrzmq?
(Although I'll answer this myself, if anyone else has some experience on the subject - alternative answer is welcome!)
The key difference between the two is in the approach:
libzmq
library in background (it's a .NET wrapper for libzmq
library);libzmq
but rewrites it in pure C#.Which one to use? Well, there's no simple answer. Here are few important things to keep in mind while choosing:
libzmq
should be significantly faster than any managed code, but in communication between CLRZMQ and libzmq
marshaling has to take place, so I really can't predict which library will win in speed.UPDATE: Another important advantage of NetMQ is support - You'll get the answer in up to day or two, and sometimes within hours.
UPDATE 2: A problem with poller implementation in NetMQ (described here) turned out to be show-stopper problem for NetMQ in my case. Due to this problem I've migrated my projects to CLRZMQ (I may change my mind down the road...) Nevertheless, talking about poller, there's one problem in CLRZMQ documentation you should be aware of, and it's described here
According to Doron Somech:
http://somdoron.com/2013/03/introducing-netmq/
As of 2014 C# binding (CLRZMQ) is no longer maintained and NetMQ is the default choice for ZeroMQ and .Net.
It seems that:
https://github.com/zeromq/clrzmq4
replaced the original CLRZMQ project.
I'm using NetMQ and looking forward to contribute to the project.
P.S. I build same Pub-Sub scenario for NetMQ and native ZeroMQ and didn't find any performance difference. Great work, Doron!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With