rabbitmq-stream-client

An async Rust client for RabbitMQ Streams with high-throughput publishing and consuming.

SDK
Cargo
v0.11.0
224stars
Apache-2.0 OR MPL-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
44/100Fair
Development Activity8
Maintenance32
Community60
Maturity56
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture82
Code Quality80
Innovation70
Learning Curve62

rabbitmq-stream-client is the official Rust client for RabbitMQ Streams, the append-only, replicated log feature of RabbitMQ built for high-throughput, low-latency messaging. It connects to a stream-enabled RabbitMQ node through an Environment entry point and exposes producers and consumers for publishing and reading messages from any position in the log.

Maintained by the RabbitMQ team, the client covers the full stream protocol: several publishing modes (buffered async, batched, and confirm-synchronous), super streams for partitioned scale-out, single active consumer, server-side Bloom-filter filtering, TLS, and load-balancer awareness. It is split into a low-level protocol crate and the high-level client API.

What You Get

  • An async Environment builder for connecting to stream-enabled RabbitMQ nodes, with TLS and load-balancer support
  • Producers with buffered async send, batch send, and synchronous send-with-confirm modes
  • Consumers that can start from any offset and use server-side offset tracking
  • Super stream producers/consumers for partitioned scale-out, single active consumer, and Bloom-filter message filtering

Common Use Cases

  • Publishing high-throughput event streams from a Rust service to RabbitMQ
  • Consuming and replaying a stream from an arbitrary offset for event sourcing or analytics
  • Scaling out publishing and consumption across partitions with super streams
  • Filtering a large stream server-side so a consumer only receives the subset of messages it needs

Under The Hood

Architecture - The repository is a Cargo workspace split into a protocol crate that encodes/decodes the binary RabbitMQ Stream protocol frames and the top-level rabbitmq-stream-client crate that layers an ergonomic API over it. The public entry point is Environment, which manages the client connection to a node; from it users derive Producer/SuperStreamProducer and Consumer/SuperStreamConsumer handles. Publishing paths (send, batch_send, send_with_confirm) and consumer offset handling are implemented as async operations over an internal connection multiplexing frames to the broker.

Tech Stack - Written almost entirely in Rust (99%+) on an async runtime, with a separate benchmark crate and a Dockerfile plus Makefile targets (make rabbitmq-server, make test) for spinning up a TLS-configured RabbitMQ node during testing. TLS configuration is a first-class part of the Environment builder.

Code Quality - The project maintains an integration test suite that requires a live TLS-enabled RabbitMQ node, plus benchmarks, CI badges, code coverage reporting via Codecov, and a dependency-freshness check. Splitting protocol encoding from the client API keeps the wire logic isolated and testable. Extensive worked examples cover async send, batch send, super streams, filtering, and single active consumer.

API Design - The API mirrors RabbitMQ’s other stream clients (notably the Java client) with a builder-driven Environment and clearly named producer/consumer types, so concepts transfer across languages. The three explicit publishing methods make the throughput-versus-durability trade-off obvious at the call site. The main ramp-up cost is understanding RabbitMQ Streams concepts (offsets, super streams, filtering) rather than the client surface itself.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search