Skip to main content


InterProcessQueues are for first in first out message transport.
This Extends the %SYSTEM.IPQ class. It provides a way to manage a set of Queues that it can receive messages from.
This class or the IPQ class can be used for receiving Queued messages, but not both at the same time.
When a get is called it will return the next msg in a round robin order from any of the attached queues to this set.
The destructor of this class or the Delete method will delete all attached Queues, and a message Put attempt to any deleted queue will fail.
The Add method adds/creates the specified Queue for Gets.

Property Inventory

Method Inventory


property SessionNum as %Integer [ Calculated ];
The session ID associated with the received message, zero if times out, or -1 if there is no active session


method Add(name As %Binary, InitialSize As %Integer) as %Integer [ Language = cpp ]
Add will Create or Attach an existing InterProcessQueue (IPQ) for Gets to this IPQ set.
Note: The Queue could be pre-created for Put but not for Get from some other object.
Create will try to pre allocate the specified number of 32K chunks for the message queue
Create will fail if another queue with the same name already exists.
Returns zero on failure else returns the Q id
When added to this set, the next call to Get will consider returning messages from the queue, if any.
method DeleteAll() as %Integer [ Language = cpp ]
DeleteAll will delete all associated queues.
InterProcessQueues are a shared object and they don't go away until they are deleted explicitly. After deletion any references to this object from the current job or any other job will fail. Returns the number of active nodes deleted. Raises an exception, if the object is not initialized, or deleted.
On destruction, it will cleanup all associated and active message Queues. (it invokes DeleteAll).
method Get(timeout As %Integer = -1) as %Integer [ Language = cpp ]
Get method waits for the specified amount of time for any message arrival in the set. Returns the first Queued msg. The SessionNum property has the rcvd msg connection number.
It returns an empty string if it times out and sets SessionNum to 0
It returns an empty string if there are no members in the IPQ set and sets SessionNum to -1

Inherited Members

Inherited Methods


FeedbackOpens in a new tab