pub struct SocketIssueMessage {Show 13 fields
pub kind: String,
pub protocol_version: u8,
pub subscription_id: Option<String>,
pub error: String,
pub message: String,
pub code: String,
pub retryable: bool,
pub retry_after: Option<u64>,
pub suggested_action: Option<String>,
pub docs_url: Option<String>,
pub replay_window: Option<ReplayWindow>,
pub recover_from: Option<String>,
pub fatal: bool,
}Expand description
Server-sent protocol, authorization, or quota error.
Fields§
§kind: String§protocol_version: u8§subscription_id: Option<String>Null only when a request did not contain a usable subscription ID.
error: String§message: String§code: String§retryable: bool§retry_after: Option<u64>§suggested_action: Option<String>§docs_url: Option<String>§replay_window: Option<ReplayWindow>Present on cursor-expired and invalid-cursor: the offsets the view
can still serve.
recover_from: Option<String>Present on replay-lagged: the cursor for the last record delivered
before the gap. Resubscribing with after set to this replays the
skipped records, provided they are still retained.
fatal: boolImplementations§
Source§impl SocketIssueMessage
impl SocketIssueMessage
pub fn from_auth_deny( deny: &AuthDeny, fatal: bool, subscription_id: Option<String>, ) -> Self
pub fn protocol( subscription_id: Option<String>, code: impl Into<String>, message: impl Into<String>, ) -> Self
Sourcepub fn replay_lagged(
subscription_id: Option<String>,
skipped: u64,
recover_from: Option<Cursor>,
) -> Self
pub fn replay_lagged( subscription_id: Option<String>, skipped: u64, recover_from: Option<Cursor>, ) -> Self
Delivery fell behind the server’s fan-out buffer and records were skipped.
recover_from is the cursor for the last record delivered before
the gap, not the latest offset seen: resubscribing after the newest
frame would step over the skipped records permanently. Delivery on
this subscription stops here, so nothing arrives that could advance
the consumer’s checkpoint past the gap.
Sourcepub fn subscription_lagged(subscription_id: String, skipped: u64) -> Self
pub fn subscription_lagged(subscription_id: String, skipped: u64) -> Self
A latest-state collection subscription fell behind and cannot recover because the client disabled authoritative snapshots.
Sourcepub fn append_subscription_lagged(subscription_id: String, skipped: u64) -> Self
pub fn append_subscription_lagged(subscription_id: String, skipped: u64) -> Self
A non-replayable append subscription cannot reconstruct records lost after falling behind its bounded live bus.
Sourcepub fn replay_refused(
subscription_id: Option<String>,
error: &ReplayError,
) -> Self
pub fn replay_refused( subscription_id: Option<String>, error: &ReplayError, ) -> Self
A replay the journal refused, rendered for the client.
Each reason gets its own code: they have different remediations, and an epoch mismatch in particular means the consumer’s whole notion of the stream is stale rather than merely out of date.