Nanomsg supposedly "died" in 2016 so I'll talk about is successor : nanomsg-next-generation or NNG (it's the same project and dev team I believe).
NNG It's a bit more complex to use, but it also does more things. Most notable differences: * NNG is implemented in C99 and build with CMake (ZMQ is implemented in C++ with a C API). * NNG has thread safe socket & async io mechanism built in. * NNG supports HTTP, TLS, Websocket communication built-in. iI've used NNG way less than ZMQ so there may be missing information in this post. The benefit of ZMQ over NNG : * It's became a standard system library on Linux and is well tested, well documented * Has implementation / bindings in many different programming language. Combined with a serialization protocol such as msgpack or protobuf it makes it easy to share data between program written in different programming language. * In many case, ZMQ is simply "good enough".