The POSIX message queue API provides basic functionality for message queues but it also has a number of limitations. It is not possible to send a message to multiple subscribers using one message queue. You have to create a separate queue for each subscriber, otherwise only one of the subscribers reading from a queue will receive the message.
There are a number of elaborated message queues and pub-sub middleware available in the form of external libraries. ZeroMQ is a powerful, flexible and—at the same time—lightweight transport library. This makes it an ideal choice for embedded applications that are built using the pub-sub model of data exchange.