In programming, message queueing is a method by which process (or program instances) can exchange or pass data using an interface to a system-managed queue of messages. Messages can vary in length and be assigned different types or usages. A message queue can be created by one process and used by multiple processes that read and/or write messages to the queue. For example, a server process can read and write messages from and to a message queue created for client processes. The message type can be used to associate a message with a particular client process even though all messages are on the same queue.
The message queue is managed by the operating system (or kernel). Application programs (or their processes) create message queues and send and receive messages using an application program interface (API). In UNIX systems, the C programming language msgget function is used with various parameters specifying the action requested, message queue ID, message type, and so forth.
The maximum size of a message in a queue is limited by the operating system and is typically 8,192 bytes.