Training
×

Message queues

We have already seen the mailbox as a universal communication object for data and objects. When only data needs to be exchanged in a coordinated way with focus on minimal overhead, use message queues.
Message queues, like data mailboxes, are used to transfer data messages of different lengths between threads. Message queues are always FIFO organized.
Message queues are designed to overcome some of the limitations of data mailboxes (specifically, a message can be bigger then 128 bytes). Emphasis has been given to optimize sending messages between nodes on the same host.