'How to do many-to-many pub sub relation

I have seen it mentioned that ZMQ supports a many-to-many PUB/SUB relation.

In this case what I would like is to have multiple subscribers to multiple publishers, (this is for a common bus style application), however what I am confused about is how to physically implement it since I have also seen it mentioned that there can only be a single bind and multiple connections to that bound socket.

Thus I am slightly confused as to how to achieve this.

I have seen that pgm may be a way to acheive this (since all members would connect to the same multicast address), but I am not sure how to physically do that...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source