I am implementing a distributed system that runs a consensus protocol. The algorithm that I am using does not matter for my question. What I am concerned with is the communication between nodes in the system. I need a way to allow for asynchronous messaging between nodes. There are certain types of messages that should trigger an event in listening nodes. For example
(node_1) sendMessageA() ---> (node_2, ..., node_n) recvMessageA()
(node_2, ..., node_n) sendMessageB() ---> (node_1) recvMessageB()
(node_1) sendMessageC() ---> (node_2, ..., node_n) recvMessageC()
...
Basically, I have a function that might be called from a given node_i, and this should send a message to the other nodes in the system and trigger the appropriate function in the other nodes. These messages need to be asynchronous in this distributed system.
What are some good frameworks or tools to help allow for this type of communication?
I am aware of Netty, and ZeroMQ, which both seem relevant for this type of problem, but I don't have experience with either. Which one of these is better suited to this type of problem? Are there any better alternatives? I would prefer a framework that uses java, but I would consider technologies that use other languages as well.