Reference

Controlled BetaVerification Required

Message Broker CLI And SDK Reference

Source-backed reference for Message Broker lifecycle flags, local and remote CLI commands, diagnostics, release artifacts, and first-party Rust SDK entry points.

Current availability

Private Beta. Public beta is scheduled for .

Maturity Status

Controlled-Beta Tooling

Controlled Beta

The CLI and SDK surfaces below are source-backed from the current broker executable, developer CLI, and native Rust API crate.

Review Boundary

Verification Required

Product, operations, support, and docs QA review still need to accept the wording before it supports external commitments.

Reference Summary

IDTypeNameMethodPath or symbolMaturityEvidence
smb-cli-lifecyclecliBroker lifecycle
Version output, pre-start validation, and local broker startup flags.
mq --version, mq --validate-config, mq --node-id ...startup flagsControlled BetaSMB-EVID-009, runtime_config.rs, main.rs
smb-cli-local-datacliLocal data CLI
Filesystem-backed developer commands for local stream records and cursors.
mq cli --data-dir <PATH> <command>stream, publish, tail, replay, cursor, group, queue viewsControlled BetaSMB-EVID-009, dev_cli/data.rs
smb-cli-diagnosticscliDiagnostics bundles
Payload-free local or remote support bundle collection with validation.
mq diagnostics collectdiagnostics collect --bundle-id <ID> --output <PATH>Controlled BetaSMB-EVID-009, dev_cli/diagnostics.rs
smb-cli-remote-managementcliRemote HTTP CLI
Read-only remote health, introspection, and diagnostics commands.
mq cli --target http://host:port <command>health and management GETsControlled BetaSMB-EVID-009, dev_cli/remote.rs
smb-cli-release-artifactscliRelease artifacts
Local Markdown generators for controlled-beta evidence and review packets.
mq cli release <command>packet, burn-down, signoff, onboarding, reset commandsControlled BetaSMB-EVID-009, dev_cli/release.rs
smb-sdk-client-configsdkClient setup
Producer identity, defaults, trace hooks, in-process clients, and HTTP transport setup.
ClientConfig, NativeClient::new, HttpNativeClient::connectstornamics_message_broker_native::*Controlled BetaSMB-EVID-009, sdk.rs
smb-sdk-publish-replaysdkPublish and replay
Typed publish, retry, bounded replay fetch, subscription replay, and cursor commit helpers.
create, publish, fetch, replay, commit cursorNativeClient and HttpNativeClient stream methodsControlled BetaSMB-EVID-009, publish_replay.rs
smb-sdk-queue-workflowssdkShared queue
Queue worker helpers for delivery mutation, retry, dead-letter, and inspection workflows.
claim, ack, nack, renew, retry, dead-letter, inspectqueue SDK helpersControlled BetaSMB-EVID-009, http_queue_worker.rs

Lifecycle CLI

Broker lifecycle commands
GroupExampleOutput or side effectBoundary
Versionmq --versionPrints release metadata from the current package.No broker node starts.
Validate configmq --validate-config --node-id local-1 --http-bind 127.0.0.1:9101 --data-dir /tmp/stornamics-mq --flush-policy append-onlyRuns the same startup parser and validation report without binding the listener.Invalid reports exit 2.
Start nodemq --node-id local-1 --http-bind 127.0.0.1:9101 --data-dir /tmp/stornamics-mq --metrics-exposure httpCreates the data directory, opens storage, validates runtime sources, and serves HTTP routes.Requires reviewed flags for protected auth, quotas, metrics export, and replication binding.

Local CLI Examples

Local data CLI commands
GroupExampleOutput or side effectBoundary
Stream catalogmq cli --data-dir /tmp/stornamics-cli stream create telemetryCreates or reuses the local stream catalog entry.State is local to the selected data directory.
Publishmq cli --data-dir /tmp/stornamics-cli publish telemetry --message-id msg-1 --payload hello --key machine-17Appends one local SegmentStorage record.Payload input is text for the developer CLI.
Replaymq cli --data-dir /tmp/stornamics-cli replay telemetry --from-offset 0 --limit 10Reads bounded records from local storage.Use positive limits and unsigned offsets.
Cursormq cli --data-dir /tmp/stornamics-cli cursor commit telemetry analytics processed 1Persists a named cursor and reports previous offset when present.The stream must exist in the local catalog first.
Queue viewsmq cli --data-dir /tmp/stornamics-cli lease list telemetry analytics --include-completedReturns an explicit empty local view with runtime_state=not_tracked.Runtime queue state is not persisted through the local CLI path yet.

Remote CLI Examples

Remote mode accepts --target http://host:port and optional --api-key <TOKEN>. The CLI sends Authorization: Bearer <TOKEN> for remote GETs and redacts that value in diagnostics bundles.

Remote HTTP CLI commands
GroupExampleOutput or side effectBoundary
Healthmq cli --target http://127.0.0.1:9101 healthCalls GET /health and returns the response body.HTTPS targets are rejected by the current CLI transport.
Consumer groupmq cli --target http://127.0.0.1:9101 consumer-group describe telemetry analyticsCalls /v1/streams/{stream}/consumer-groups/{consumer_group}.Broker error bodies are returned rather than hidden.
Cursor listmq cli --target http://127.0.0.1:9101 cursor list telemetry analyticsCalls /v1/streams/{stream}/consumer-groups/{consumer_group}/cursors.Path tokens are URL-encoded.
Lease listmq cli --target http://127.0.0.1:9101 lease list telemetry analytics --include-completedCalls /leases?include_completed=true.Remote data writes remain unsupported.
Diagnosticsmq cli --target http://127.0.0.1:9101 --api-key dev-api-key diagnostics collect --bundle-id diag-http-001 --output /tmp/diag-http-001.jsonCollects health, metrics, streams, replication status, and audit route bodies.The API key is redacted in the diagnostics bundle.

Diagnostics Bundles

Diagnostics collection writes a validated stornamics.diagnostics_bundle.v1 JSON document with configuration, topology, metrics, stream metadata, cursor state, recent errors, version information, command outputs, and redactions.

Remote collection calls GET /health, GET /metrics, GET /v1/streams, GET /v1/replication/status, and GET /v1/audit/events?start_offset=0&max_records=100. Current collectors reject --include-payloads.

Release Artifact CLI

Release and onboarding artifact commands
GroupExampleOutput or side effectBoundary
packet-templatemq cli release packet-template --output-path /tmp/eps-040.mdGenerates the EPS-040 release-candidate packet template.Local artifact generation only.
evidence-burn-downmq cli --output json release evidence-burn-down --output-path /tmp/pm-009.mdRenders PM-009 action and readiness counts from packet inputs.Use JSON output for automation status.
controlled-beta-onboardingmq cli release controlled-beta-onboarding --audience pilot-alpha --owner AvaGenerates the PM-010 onboarding package.Replace placeholders before treating output as pilot-ready.
post-pilot-roadmap-resetmq cli release post-pilot-roadmap-reset --pilot-name pilot-alpha --decision-date 2026-08-07Generates the PM-012 post-pilot reset package.Requires pilot go/no-go inputs before review.

Rust SDK Entry Points

Entry pointApplies toInputsResponseEvidence
ClientConfig::newNative and HTTP clientsProducer id, optional epoch, default durability, default headers, and trace context.Defaults used for publish idempotency and metadata.sdk.rs
NativeClient::newIn-process NativeBrokerApi implementationsBroker implementation plus ClientConfig.Typed client or SdkError::InvalidConfig.sdk.rs
HttpNativeClient::connectRunning broker HTTP routeshttp://host[:port] base URL plus ClientConfig.Standard-library TCP HTTP client.sdk.rs
publish / publish_with_retryNative and HTTP clientsPublishMessage plus optional PublishRetryPolicy.PublishResponse; retry reuses idempotency fields.sdk.rs, idempotent_publish_retry.rs
subscribe_replay / fetch / fetch_from_offsetReplay workflowsStream, consumer group, start position, offset, and max records.Typed replay page without queue side effects.sdk.rs, publish_replay.rs
claim_queue / subscribe_queueShared queue workersStream, group, offset, max messages, and lease timeout.FetchResponse with delivery metadata.sdk.rs, http_queue_worker.rs
ack / nack / renew_lease / retry_delivery / dead_letterQueue delivery mutationClaim or subscription, delivery, reason, delay, or dead-letter stream.Typed queue mutation response.sdk.rs, native-sdk.md
inspect_leases / inspect_delayed_messages / inspect_replay_consumers / describe_consumer_groupOperator and repair toolingStream, consumer group filter, and include-completed flag.Typed inspection response.sdk.rs, native-sdk.md

SDK Publish And Replay Example

use stornamics_message_broker_native::{
    ClientConfig, DurabilityMode, InMemoryBroker, NativeClient, PublishMessage,
    RetentionPolicy, StartPosition, Timestamp,
};

let broker = InMemoryBroker::with_start_time(Timestamp::from_unix_millis(10_000));
let mut client = NativeClient::new(broker, ClientConfig::new("analytics-producer"))?;

client.create_stream("telemetry", DurabilityMode::LocalDisk, RetentionPolicy::default())?;
client.publish(
    PublishMessage::new(
        "telemetry",
        Timestamp::from_unix_millis(1_700_000_000_000),
        b"reading-1".to_vec(),
    )
    .with_message_id("reading-1"),
)?;

let replay = client.subscribe_replay("telemetry", "analytics", StartPosition::Earliest)?;
let fetched = client.fetch(&replay, 100)?;
client.commit_cursor("telemetry", "analytics", "processed", fetched.next_offset)?;

SDK HTTP Queue Example

use stornamics_message_broker_native::{ClientConfig, HttpNativeClient};

let mut client = HttpNativeClient::connect(
    "http://127.0.0.1:9101",
    ClientConfig::new("worker-a"),
)?;

let claim = client.claim_queue("jobs", "workers", 0, 1, Some(30_000))?;
let delivery = &claim.messages[0];
client.retry_delivery(&claim, delivery, "dependency unavailable", 250)?;

HttpNativeClient currently builds unauthenticated http:// requests. Use it against local insecure endpoints or provide a custom SdkHttpTransport when the caller must inject credentials, TLS, tracing, or test fixtures.

Errors And Limits

SurfaceError or limitMeaningRecovery
Lifecycle CLIExit 2Startup args or validation report failed.Fix flags, secret-source configuration, metrics settings, replication binding, or quota values.
Local CLIUsage errorRequired arguments or flags are missing or invalid.Use mq cli --help, positive limits, and unsigned offsets.
Remote CLIUnsupported commandRemote data writes and release artifacts are not wired to remote routes.Use local CLI mode, HTTP routes, or the SDK route helper.
Diagnostics--include-payloads unsupportedCurrent collectors never read message payloads.Run without the flag until an explicit offline collector exists.
SDKSdkError::InvalidConfigBlank producer id or unsupported HTTP base URL.Provide a non-empty producer id and http://host[:port].
SDKSdkError::HttpBrokerBroker returned a non-2xx JSON error.Inspect status, code, message, action, and retryability.
SDK queueStale delivery stateDelivery id or lease is missing, expired, or terminal.Claim current work and retry with fresh delivery metadata.

Review Boundary

Internal review records track this CLI and SDK reference and the evidence required to change release, diagnostic, or SDK status.

Safe Next Steps

  • Available: DOCS-031

    Read HTTP reference

    Map the CLI and SDK helpers back to implemented health, stream, record, cursor, queue, replication, audit, metrics, and storage routes.

  • Available now

    Run stream and queue quickstart

    Exercise local stream create, publish, replay, queue claim, ack, and inspection behavior.

  • Available now

    Review Message Broker evidence

    Check evidence records before strengthening CLI, SDK, support, or pilot-readiness wording.

  • Available: DOCS-040

    Compare route and auth scope

    Separate controlled-beta routes from auth, replication, queue, CLI, SDK, and Kafka protocol boundaries.