Distributed Queue (-DQ)
Use the Distributed Queue adapter command (-DQ) to assign a correspondent name identifying data sources as members of a distributed queue and to set scheduling parameters.
-DQ QName[, ScdWt[, Hrtbt][, Actvn]]
- Option
- Description
- Qname
- This is a reusable correspondent name that defines a distributed queue.
- ScdWt
- This is the scheduler weight, which is a value that determines the queue member selected as the scheduler. The member with the greatest scheduler weight takes precedence. Acceptable values range between 1 and 65535, where the higher number has the greater scheduler weight.
- Hrtbt
- This is the scheduler heartbeat, which is an interval (in milliseconds) that is used to send messages from the scheduler session to inform other members that a member is acting as the scheduler. Acceptable values are unsigned 32-bit integers (except zero).
- Actvn
- This is the scheduler activation, which is the length of time (in milliseconds) that the heartbeat signal from the scheduler must be silent before the queue member with the greatest scheduler weight takes its place as the new scheduler. Acceptable values are unsigned 32-bit integers (except zero).
The member sessions of a distributed queue share the same reusable correspondent name (Qname), indicating that they are members of that queue. Each member of a distributed queue must use the same Qname.
The scheduler weight (ScdWt) represents the ability of the current session to fulfill the role of scheduler relative to other members of the same queue. If ScdWt is not specified, the default scheduler weight is 1.
All sessions in the queue must specify the same scheduler heartbeat value (Hrtbt) in milliseconds. If Hrtbt is not specified, the default heartbeat is 1000. ScdWt is required before you can specify Hrtbt.
All sessions in the queue must specify the same scheduler activation (Actvn) value in milliseconds. If Actvn is not specified, the default scheduler activation is 3000. ScdWt and Hrtbt are required before you can specify Actvn.
For example, to implement a distributed queue named dq.local that will listen for messages from the subject rv.msg and set the scheduler weight to 5, the scheduler heartbeat to 2000 (2 seconds), and the scheduler activation to 6000 (6 seconds), the syntax would be:
-SBN rv.msg -DQ dq.local, 5, 2000, 6000
To set listener options for members of a distributed queue, see the Queue Options (-QO) adapter command.