Skip to main content
Version: 1.0.0 (development)

Errors, statuses, and recovery decisions

First identify the boundary that reported the failure. A Rust error code, remoting response code, gRPC payload status, gRPC transport status, and process exit code describe different contracts. Preserve the code and operation context; do not build integrations by matching a human-readable error sentence.

Which value should a caller inspect?

SurfaceValue to inspectInterpretation
Canonical Rust errorError::descriptor() and its stable dotted codeIdentifies the declared failure and recovery hint; retains a typed cause for internal diagnosis.
Client facade errorClientError::descriptor() or shared_error()Preserves the canonical descriptor instead of flattening the cause into a string.
Remoting responseNumeric response code and approved response fieldsMany canonical errors can project to the same numeric code; a numeric code is not a unique internal cause.
Proxy gRPCMethod response status, item statuses where present, and transport resultA successfully delivered RPC can carry a failed RocketMQ operation. A transport failure may prevent any payload result.
Producer resultOuter result, result presence, then SendResult.send_statusA returned result can still report a flush/replication timeout.
CLIProcess exit status, safe stderr, and command-specific outputExit status is an automation signal; partial operation results may also require inspection.

The error catalog and its component modules own descriptor identities and projections. An outer service boundary can wrap a cause in a service-level descriptor, so a startup failure does not necessarily expose the innermost configuration error code.

Common canonical errors

The recovery hint is catalog metadata. The action column explains how to combine it with the operation; it is not an automatic retry promise.

Stable codeCatalog hintCommon cause and next action
core.configuration.parse_failedNeverInvalid input syntax or deserialization. Correct the selected file/format before starting again.
core.configuration.missing / core.configuration.invalidNeverMissing required setting or invalid value/combination. Inspect the owning configuration schema and precedence.
protocol.header.invalid / protocol.body.invalidNeverMalformed fields or body encoding. Fix the request; replaying identical bytes will not repair it.
protocol.request.unsupported / protocol.version.unsupportedNeverSelected endpoint or version does not implement the request. Check endpoint, feature, and compatibility scope.
route.topic.not_foundRefreshRouteTopic absent, unregistered, or not visible through the selected NameServer. Verify provisioning and Broker registration, then refresh within a bounded retry budget.
auth.credentials.invalidRefreshCredentialsInvalid identity/signature or stale credentials. Correct or rotate credentials; never include their values in diagnostics.
auth.permission.deniedNeverThe identity lacks permission for the requested resource/action. Verify policy and resource scope rather than retrying unchanged credentials indefinitely.
transport.admission.queue_saturatedBackoffLocal request admission is full. Reduce concurrency, inspect pending count/bytes, and retry only within the operation's budget.
transport.connection.timeout / transport.response.timeoutBackoffConnection or response deadline elapsed. Determine whether request bytes may have reached the peer before deciding whether a mutation is safe to repeat.
controller.leadership.not_leaderRefreshLeaderRequest reached a Controller that is not the current leader. Refresh leader metadata; preserve the original operation identity.
storage.capacity.exhaustedOperatorActionStorage cannot admit the operation. Inspect free space, retention pressure, and configured limits; retries alone do not create capacity.
storage.read.failed / storage.write.failedOperatorActionThe storage operation failed. Preserve bounded diagnostic context and investigate the I/O/backend state.
storage.state.corruptedOperatorActionStorage state violates its expected format/invariants. Isolate the affected recovery path and use the backup/recovery procedure; do not delete format metadata to suppress the error.

The table is a working reference, not the entire catalog. Broker, Proxy, Controller, Client, auth, observability, and tooling have more specific descriptors in component catalogs. Preserve a more specific descriptor when it is already available.

Descriptor projections: exact examples

These examples are the catalog's declared projections. They do not imply that every HTTP or gRPC endpoint uses the same outer envelope or always returns the listed transport status.

Canonical descriptorRemotinggRPC payload / transport projectionHTTP / CLI projection
protocol.header.invalidInvalidParameter (29)BadRequest / InvalidArgument400 / 64
route.topic.not_foundTopicNotExist (17)TopicNotFound / NotFound404 / 66
auth.credentials.invalidNoPermission (16)Unauthorized / Unauthenticated401 / 77
auth.permission.deniedNoPermission (16)Forbidden / PermissionDenied403 / 77
transport.admission.queue_saturatedSystemBusy (2)TooManyRequests / ResourceExhausted429 / 75
controller.leadership.not_leaderControllerNotLeader (2007)InternalError / FailedPrecondition409 / 65
storage.capacity.exhaustedSystemError (1)InternalError / ResourceExhausted507 / 65

For example, both invalid credentials and denied permissions map to remoting code 16. A retry implementation that sees only 16 cannot infer that refreshing credentials will solve a policy denial. Likewise, a generic SystemError can represent several storage or service failures and is not a safe instruction to replay a write.

The numbers and lightweight enums are defined in boundary types. Adapter code translates them to protocol-specific response types; the error kernel itself does not own networking.

Send and pull outcomes are not all errors

ResultMeaningCaller behavior
SendStatus::SendOk / SEND_OKThe chosen send path satisfied its configured response conditionContinue according to the business contract; this does not prove consumer processing.
FlushDiskTimeout / FLUSH_DISK_TIMEOUTRequested local-flush wait timed outTreat durability outcome as uncertain. Diagnose disk progress and use idempotent retry logic.
FlushSlaveTimeout / FLUSH_SLAVE_TIMEOUTRequested replica wait timed outInspect replication progress and the selected acknowledgment policy.
SlaveNotAvailable / SLAVE_NOT_AVAILABLEThe required replica was unavailableRestore the intended topology or make an explicit availability/durability decision.
Pull FoundMessages were returnedProcess before advancing business-completion offsets.
Pull NoNewMsg / NoMatchedMsgNo new messages or no messages matching the selectionContinue polling according to the returned progress and wait policy; do not treat this as a transport outage.
Pull OffsetIllegalRequested offset is outside the acceptable queue rangeInspect returned offset guidance, retention, and the consumer's recovery policy before moving progress.

The canonical result definitions are in rocketmq-model::result. A one-way send has no Broker response to inspect. POP receipt/invisible-time errors require the POP acknowledgment model rather than classic pull-offset recovery. See delivery and retry, LitePull, and POP.

Safe CLI diagnostics

The canonical CLI view emits one line in this form:

ERROR route.topic.not_found: Topic route was not found

Default output contains the stable code and fixed public message. Verbose mode may append only descriptor-approved, bounded diagnostic fields; secret-bearing values become <redacted>. Neither mode renders source errors, source locations, or backtraces through this view. Use the selected tool's help to determine whether it exposes verbose mode.

Canonical CLI exit codeMeaning
64Usage or argument failure
65Data or state condition requiring attention
66Requested resource not found
69Service/resource unavailable
70Software/internal failure
75Temporary failure
77Permission/authentication failure
78Configuration failure

These values describe the shared error view. CLI parsers, wrappers, and specialized commands can define additional exit behavior; for example, a tool-specific preflight denial is not automatically one of these catalog classes. Retain the actual exit code and structured result, not just the last printed line.

Make a recovery decision

  1. Identify the operation, endpoint, response layer, stable error/status, and remaining deadline.
  2. Determine whether the operation is read-only, idempotent, or a mutation with uncertain completion. Transport cancellation does not undo remote work.
  3. Apply the relevant hint: back off, refresh routing/leader/credentials, or repair configuration/capacity. Bound retries by both attempts and elapsed time.
  4. Confirm the original business result or resource state after recovery. Repeated sends must preserve a business event identity and tolerate duplicate delivery.

Collect service role, operation name, approved resource identifiers, elapsed time, and relevant queue/storage/replica progress. Keep credentials, ACL/TLS material, message bodies, arbitrary request objects, and raw configuration values out of shared logs and issue reports. A generic public error intentionally exposes less than the internal cause; use approved diagnostics and troubleshooting rather than weakening redaction.