TsgcWSPClient_Dataset › Properties › QoS
QoS Property
Quality of Service options (Level, Interval, Timeout) for acknowledged delivery.
Syntax
property QoS: TsgcWSQoS_Options read FQoS write SetQoS;
Default Value
—
Remarks
Three delivery guarantees are supported, equivalent to the MQTT model:
- Level 0 — "At most once": the message is delivered best-effort over TCP with no retry and no acknowledgement. It arrives once or not at all.
- Level 1 — "At least once": the receipt of the message is confirmed with an Acknowledgment. If the ack is not received within Timeout seconds, the sender resends the message; an Id field is included so duplicates can be detected.
- Level 2 — "Exactly once": the message is guaranteed to arrive exactly once using a two-step handshake. Use this for operations such as billing where duplicate or lost messages are not acceptable.
Interval controls how often the internal QoS timer scans pending messages; Timeout is the number of seconds without acknowledgement after which a message is resent.
Example
oProtocol.QoS.Level := qosLevel1;
oProtocol.QoS.Interval := 60;
oProtocol.QoS.Timeout := 300;
Back to Properties