@@ -563,6 +563,7 @@ For installation information, see the [Node-oracledb Installation Instructions][
563563 - 27.3 [Changing AQ options](#aqoptions)
564564 - 27.4 [Enqueuing and Dequeuing Multiple Messages](#aqmultiplemessages)
565565 - 27.5 [Advanced Queuing Notifications](#aqnotifications)
566+ - 27.6 [Recipient Lists](#aqrecipientlists)
56656728. [Globalization and National Language Support (NLS)](#nls)
56756829. [End-to-end Tracing, Mid-tier Authentication, and Auditing](#endtoend)
56856930. [Simple Oracle Document Access (SODA)](#sodaoverview)
@@ -5941,9 +5942,11 @@ some attributes controlling the behavior of the queued message.
59415942 `expiration` | The number of seconds the message is available to be dequeued before it expires.
59425943 `payload` | A String, Buffer or [DbObject](#dbobjectclass) that is the actual message to be queued. This property must be specified.
59435944 `priority` | An integer priority of the message.
5945+ `recipients` | An array of strings where each string is a recipients name.
59445946
59455947 See [Oracle Advanced Queuing Documentation][129] for more information about attributes.
59465948
5949+ The `recipients` attribute was added in node-oracledb 5.5.
59475950
59485951- ```
59495952 function(Error error)
@@ -16532,6 +16535,44 @@ about subscriptions and notifications.
1653216535AQ notifications require the same configuration as CQN. Specifically
1653316536the database must be able to connect back to node-oracledb.
1653416537
16538+ ### <a name="aqrecipientlists"></a> 27.6 Recipient Lists
16539+
16540+ A list of recipient names can be associated with a message at the time a
16541+ message is enqueued. This allows a limited set of recipients to dequeue each
16542+ message. The recipient list associated with the message overrides the queue
16543+ subscriber list, if there is one. The recipient names need not be in the
16544+ subscriber list but can be, if desired.
16545+
16546+ To dequeue a message, the `consumerName` attribute can be set to one of the
16547+ recipient names. The original message recipient list is not available on
16548+ dequeued messages. All recipients have to dequeue a message before it gets
16549+ removed from the queue.
16550+
16551+ Subscribing to a queue is like subscribing to a magazine: each subscriber can
16552+ dequeue all the messages placed into a specific queue, just as each magazine
16553+ subscriber has access to all its articles. Being a recipient, however, is like
16554+ getting a letter: each recipient is a designated target of a particular
16555+ message.
16556+
16557+ For example, to enqueue a message meant for "payroll" recipients:
16558+
16559+ ```
16560+ await queue.enqOne({
16561+ payload: "Message 1",
16562+ recipients: [ "payroll" ]
16563+ });
16564+ ```
16565+
16566+ Later, when dequeuing messages, the "payroll" recipient can be set using the
16567+ `consumerName` property to get the message:
16568+
16569+ ```
16570+ Object.assign(
16571+ queue.deqOptions,
16572+ { consumerName: "payroll" }
16573+ );
16574+ const msg = await queue.deqOne();
16575+ ```
1653516576
1653616577## <a name="nls"></a> 28. Globalization and National Language Support (NLS)
1653716578
0 commit comments