OpenHiva::TopicOptions::BuildQueueOptions
Description
Sets queue parameters for DSF communication.
Prototype
OpenHiva::TopicOptions &OpenHiva::TopicOptions::BuildQueueOptions(const uint32_t queueDepth, const bool overwrite = true, const bool queueFCFlag = false, const uint32_t queueTTL = 1000U)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
queueDepth |
Input |
Sets the length of the DSF communication publishing or subscription queue. |
overwrite |
Input |
Indicates whether overwrite is performed in the queue for DSF communication. If this parameter is set to true, messages at the beginning of the queue are discarded when the queue is full, and new messages enter the end of the queue. |
queueFCFlag |
Input |
Indicates whether to perform flow control on DSF communication. If this parameter is set to false, flow control is disabled. |
queueTTL |
Input |
This parameter is valid only when queueFCFlag is set to true and flow control is enabled. This parameter describes the difference between the time when a message enters the queue and the time when the message leaves the queue. If the time difference is less than or equal to queueTTL, the message is discarded when the message leaves the queue. |
Returns
The TopicOptions object with QueueOptions set is returned.
Usage
This interface is used to set attributes related to DSF communication queues.
Precautions
- Non-reentrant, synchronous interface.
- This interface must be invoked to set the queue length when DSF communication is used.