Why one might need JeroMQ if it can use JZMQ?

别等时光非礼了梦想. 提交于 2020-07-18 11:50:28

问题


Simple question. Why "porting" zmq on java and call it JeroMQ is good idea?


回答1:


JeroMQ is an official project of the ZeroMQ community; it's a full port of the C++ libzmq library, supporting version 3.2.

Advantages:

  • Pure Java, so no need to link in C/C++ via JNI. This is extremely helpful on devices where native libraries are difficult or impossible.
  • 100% compatible with the JZMQ API (the two projects agreed on a single API so you can import one or the other transparently).
  • 100% compatible with the ZeroMQ wire protocol, so you can run some nodes using JeroMQ and some using the native library, and it works as expected.
  • Good performance, relatively close to the native library.

Disadvantages:

  • No PGM multicast - there is no Java version of that library yet.
  • Does not yet support ZeroMQ v4 functionality, including security.



回答2:


JeroMQ is a pure Java implementation of ZeroMq. If your target language is Java, it's easier to get started with JeroMq since it uses a single jar file. ZeroMq (zmq), on the other hand, is written in C. You must build zmq, libzmq, and the Java language bindings, jzmq, to use it in a Java app. The JeroMq API is identical to jzmq, so starting with JeroMq and switching to jzmq later has no impact on your application with the exception of performance; zmq performs better than JeroMq.

Hope that helps,



来源:https://stackoverflow.com/questions/19037052/why-one-might-need-jeromq-if-it-can-use-jzmq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!