TsgcWSPServer_sgc › 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": messages sent from the server are delivered best-effort over TCP with no retry and no acknowledgement.
- Level 1 — "At least once": outgoing messages carry an Id; the server keeps them in a pending list and resends them if the client does not acknowledge within Timeout seconds. Duplicates are detected by Id.
- Level 2 — "Exactly once": the server performs a two-step PubRec/PubRel handshake before releasing the message to subscribers. Use this for operations 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 to the client.
Example
oProtocol.QoS.Level := qosLevel1;
oProtocol.QoS.Interval := 60;
oProtocol.QoS.Timeout := 300;
Back to Properties