zeromq / clrzmq4

ZeroMQ C# namespace (.NET and mono, Windows, Linux and MacOSX, x86 and amd64)
GNU Lesser General Public License v3.0
241 stars 112 forks source link

Versioning for C# binding and libzmq.dll v3, v4 #81

Closed zski05 closed 5 years ago

zski05 commented 7 years ago

I have some questions regarding ZMQ versioning. Any input is much appreciated.

The NuGet package manager in visual studio currently offers the ZeroMQ C# binding versioned 4.1.0.21 (for the clr namespace). Installing this package provides the libzmq.dll with a version of 4.1.5. The application I am working on utilizes a binding in another language which is most stable using an older 3.x version of the libzmq.dll. What are my options for the C# binding that will be compatible with a 3.x version of the libzmq.dll?

1) Can I run the latest binding on the C# side using the 4.1.5 version of libzmq.dll and use the legacy version of zmq from the other component of the application? In general, do all components using zeroMQ to communicate need to use the same libzmq.dll version?

2) Can I run the latest binding on the C# side with a 3.x version of the libzmq.dll?

3) Is there a good option for downgrading the binding and libzmq.dll on the C# side, for example the clrzmq package on NuGet?

Any input appreciated. Thank you.

metadings commented 7 years ago

Please wait for NuGet/ZeroMQ v4.1.0.22 or compile ZeroMQ.dll from github.com/ZeroMQ/clrzmq4 ... I've added backwards compatibility but I can't test it, would you like to do this?

You just need to replace the files libzmq.* in folders amd64 and i386, with the old version of libzmq. (I believe they are compatible, libzmq v3 and libzmq v4, but you should try this.)

For v4.1.x: I've currently reverted to an older version, just to have zmq_curve_keypair. However, you can also replace files libzmq. and libsodium. in folders amd64 and i386, with your own, newer or older version (not v2, but as of now v3 and v4).

zski05 commented 7 years ago

Thanks so much for the information! I installed the v4.1.0.22 from NuGet and ran initial testing with the 3.2.4 version of ZeroMQ. So far no issues. Will keep you posted.

sigiesec commented 7 years ago

@zski05 Regarding your question 1: libzmq 4.x can communicate with libzmq 3.x, but is constrained to the feature set of ZMTP2.0/libzmq 3.x then. I suggest this is the way to go. With API improvements in libzmq 4.x going on, it will be increasingly difficult to provide a wrapper that supports both libzmq 3.x and 4.x, and there is no real benefit in doing this.

metadings commented 5 years ago
  1. Can I run the latest binding on the C# side with a 3.x version of the libzmq.dll?

Yes, this was intendend to do so... Just place a file (or hardlink) libzmq.dll or .so into the folder amd64 or i386.

--

Closing this issue. It's too old