Expand description
Message Reliability Protocol (MRP) timing parameters and backoff math per Matter specification section 4.12.
Peers advertise their session intervals in mDNS TXT records (keys SII, SAI, SAT - decimal milliseconds). Senders derive retransmission deadlines from these values using exponential backoff with jitter:
t = i * MARGIN * BASE^max(0, n - THRESHOLD) * (1 + rand * JITTER)
where i is the peer’s active interval (SAI) if the peer was heard from
within the active threshold (SAT), otherwise its idle interval (SII), and
n is the 0-based retransmission index. A message is given up on after
MRP_MAX_TRANSMISSIONS total transmissions.
Used by [crate::retransmit] (handshake exchanges) and
[crate::active_connection] (operational traffic). Parameters are stored
on the transport connection (crate::transport::ConnectionTrait::mrp_params).
Structs§
- MrpParameters
- Peer MRP intervals, typically taken from its mDNS TXT records.
Constants§
- MRP_
BACKOFF_ BASE - MRP_
BACKOFF_ JITTER - MRP_
BACKOFF_ MARGIN - MRP_
BACKOFF_ THRESHOLD - MRP_
MAX_ INTERVAL_ MS - Spec cap for advertised SII/SAI values (milliseconds).
- MRP_
MAX_ TRANSMISSIONS - Maximum number of transmissions of a single message (initial + retransmits).
Functions§
- backoff_
interval - Wait time before the next retransmission per spec 4.12 backoff formula.
retransmission_indexis 0 for the wait after the initial transmission. - base_
interval - Base retransmission interval: the peer’s active interval if it was heard from within the active threshold, otherwise its idle interval.