Message queues

Messages can be sent as short messages – where the data is stored directly in the queue - or as long messages which requires a handshake between sender and receiver.
The boundary between short and long messages is defined by the user when the queue object is created.
 
Short messages are stored back-to-back in the queue, the sending call returns immediately. Each message has an administrative overhead of 34 bytes. When all the space of the queue is used up, the sender will get an E_LIMIT failure status. A message queue – unlike a data mailbox – does not get extended beyond the size specified at creation time.
 
Sending a long message will block the sending thread until a receiving thread provides a buffer long enough to hold the message or until the timeout value given for the send is reached.
 
The use of a message queue requires at least the sender or receiver to share the same node with the queue object.