I'm going to implement a distributed message bus over ZeroMQ and I'm trying to make it as efficient as possible. My requirements are:
- multiple processes are connected to a bus, some of them are on the same machine, some not.
- processes can subscribe to some topics
- unfortunately, no multicast (it is not supported in the production environment - Amazon)
- I need multilanguage soultion (at least for C++, Haskell and Python)
Approaches I'm considering are:
1. Directory Service + Mesh topology
- there is a single Directory Service which has a list of all connected processes and their addresses.
- each process connects to DS on start and asks for addresses of others
- each process has a Pub and Sub sockets connected to all other processes (mesh topology)
2. Broker
- all processes are connected to a broker which distributes messages using Pub socket.
Are there any other/better architectures to use with ZeroMQ to create such message bus?