POSIX message queues
Message queues are identified by a name, which must begin with a forward slash / and contain only one / character: message queues are actually kept in a pseudo filesystem of the type mqueue. You create a queue and get a reference to an existing queue through mq_open(3), which returns a file descriptor. Each message has a priority, and messages are read from the queue based on priority and then on the age order. Messages can be up to /proc/sys/kernel/msgmax bytes long.
The default value is 8 KiB, but you can set it to be any size in the range 128 bytes to 1 MiB by writing the value to /proc/sys/kernel/msgmax bytes. Each message has a priority. They are read from the queue based on the priority then the age order. Since ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access