Module commands

Module commands 

Expand description

Commands sent from the client handle to the event loop.

Each command carries two completion channels:

  • queued_tx is fired once the command’s session mutation has been made durable, regardless of connection state:

    • Subscriptions and QoS >= 1 publishes: after the persist that covers the stored filter / outbox entry succeeds (immediately after the mutation when no persistence is configured).
    • QoS 0 publishes: immediately on acceptance (no durable state).

    The Option wrapper allows the event loop to pre-fire the signal during the offline backoff phase and then process the wire send later.

  • completion_tx is fired when the broker acknowledges the operation (PUBACK / PUBCOMP / SUBACK / UNSUBACK). For QoS 0 publishes it is resolved when the bytes are written.

Structs§

PendingAck
Held by the event loop for an in-flight SUBSCRIBE or UNSUBSCRIBE, keyed by packet id. The core now owns the filter list and the reason-code rules; the runtime only needs to resolve the user-facing future on the ack.
PendingPublish
Held by the event loop for each in-flight QoS >= 1 publish.

Enums§

AckCompletion
Where an in-flight SUBSCRIBE/UNSUBSCRIBE’s outcome goes once the SUBACK/UNSUBACK arrives (or the operation is dropped or superseded).
Command