I'd have a look at the Spread Toolkit. Well it's C, but C++ bindings exist, and it's also easy to roll your own. Yours sounds pretty much like some projects where I've used it with great success (though without any bindings).
From the project's website:
Spread is an open source toolkit that provides a high performance messaging service that is resilient to faults across local and wide area networks. Spread functions as a unified message bus for distributed applications, and provides highly tuned application-level multicast, group communication, and point to point support. Spread services range from reliable messaging to fully ordered messages with delivery guarantees.
Spread can be used in many distributed applications that require high reliability, high performance, and robust communication among various subsets of members. The toolkit is designed to encapsulate the challenging aspects of asynchronous networks and enable the construction of reliable and scalable distributed applications.
Spread consists of a library that user applications are linked with, a binary daemon which runs on each computer that is part of the processor group, and various utility and demonstration programs.
Some of the services and benefits provided by Spread:
- Reliable and scalable messaging and group communication.
- A very powerful but simple API simplifies the construction of distributed architectures.
- Easy to use, deploy and maintain.
- Highly scalable from one local area network to complex wide area networks.
- Supports thousands of groups with different sets of members.
- Enables message reliability in the presence of machine failures, process crashes and recoveries, and network partitions and merges.
- Provides a range of reliability, ordering and stability guarantees for messages.
- Emphasis on robustness and high performance.
- Completely distributed algorithms with no central point of failure.
I am aware that based on all this, it sounds like it must be complicated stuff and probably overkill to any small project -- but actually it is not: the basic usage is really simple. Well surely it is complex under the hood, because the problems that the toolkit solves are inherently quite difficult; but at least I never had to look there, just like I never checked how TCP really works, even though I've been using it extensively.
(No, I don't work for the project in any way. Just a happy user.)