#[non_exhaustive]pub enum FastPublishErrorKind {
Show 17 variants
NotEnabled,
InvalidPattern,
InvalidBatchId,
UnknownBatchId,
TooManyInflight,
GapDetected,
FlowError,
EmptyBatch,
InvalidInboxShape,
InvalidConfig,
Closed,
Timeout,
Subscribe,
Publish,
Serialization,
InvalidState,
Other,
}Expand description
Kinds of errors that can occur during fast-ingest batch publishing.
API error codes are verified against nats-server 2.14 errors.json.
Marked #[non_exhaustive] — adding a new variant in a future release will
not be a breaking change. Match on _ for forward compatibility.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotEnabled
Stream does not have allow_batched: true. (BATCH_PUBLISH_DISABLED, 10205)
InvalidPattern
Reply subject pattern rejected by the server. (BATCH_PUBLISH_INVALID_PATTERN, 10206)
InvalidBatchId
Batch id exceeds 64 characters or is otherwise invalid.
(BATCH_PUBLISH_INVALID_BATCH_ID, 10207)
UnknownBatchId
Server has forgotten this batch (timed out, leader change in
GapMode::Fail, etc.). (BATCH_PUBLISH_UNKNOWN_BATCH_ID, 10208)
TooManyInflight
Too many in-flight fast batches on the server.
(BATCH_PUBLISH_TOO_MANY_INFLIGHT, 10211)
GapDetected
A gap was detected while running in GapMode::Fail. The final ack
will indicate which messages were persisted.
FlowError
Any other server-side error reported via a BatchFlowErr message.
EmptyBatch
close() was called on a publisher that has not received any adds.
InvalidInboxShape
build() rejected the inbox because it does not have exactly two
tokens. The reply-subject parser requires <prefix>.<id> shape.
InvalidConfig
build() rejected a configuration value (e.g. max_outstanding_acks
outside 1..=3).
Closed
Called a method on a publisher that has already committed, closed, or failed fatally.
Timeout
Timed out waiting for a flow ack or final pub ack.
Subscribe
Failed to subscribe to the batch inbox.
Publish
Failed to publish a batch message.
Serialization
Failed to parse a server response.
InvalidState
An internal operation that depends on a runtime invariant was called before that invariant held — currently only emitted when the publisher would need to send a ping but no message has been published yet, so there is no first-subject to address the ping to.
Other
Catch-all.
Trait Implementations§
Source§impl Clone for FastPublishErrorKind
impl Clone for FastPublishErrorKind
Source§fn clone(&self) -> FastPublishErrorKind
fn clone(&self) -> FastPublishErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FastPublishErrorKind
impl Debug for FastPublishErrorKind
Source§impl Display for FastPublishErrorKind
impl Display for FastPublishErrorKind
Source§impl Hash for FastPublishErrorKind
impl Hash for FastPublishErrorKind
Source§impl PartialEq for FastPublishErrorKind
impl PartialEq for FastPublishErrorKind
Source§fn eq(&self, other: &FastPublishErrorKind) -> bool
fn eq(&self, other: &FastPublishErrorKind) -> bool
self and other values to be equal, and is used by ==.