message.usePriorityQueue¶
Signature: message.usePriorityQueue(value*)
Returns: void
Flags this message for the priority outbound queue. Each destination sends all of its priority messages, oldest first, before returning to its regular outbound queue, and every destination of a flagged message honors the flag. The flag persists with the message, so it survives a channel or engine restart, and the destination's send delay/interval still applies. Set value to false to clear the flag; the last value set before the message reaches a destination wins.
Note
On a channel set to process messages in the order received, whether plain or by ID, the priority send order overrides that ordering and a warning is logged for each priority message.
Note
Not available in a destination script, whether a Destination Custom Script or an acknowledgement or response script: the message has already left the outbound queue there, so the call is rejected.
Note
This method only applies to the following formatted messages: HL7, ASTM, Binary, CSV, DICOM, EDIFACT, Old Fxd Width, Fxd Length, ISO 8583, JSON, Text, X12, XML.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| Boolean | value* | (optional) false clears the priority flag | true |
Example¶
// Example: send an urgent message ahead of the queued backlog.
// Flag the message for the priority outbound queue. Each destination
// sends its priority messages, oldest first, before its regular queue.
message.usePriorityQueue();
// The last value set before the destination wins:
// false clears the flag ...
message.usePriorityQueue(false);
// ... and true re-flags it.
message.usePriorityQueue(true);