Skip to main content

Crate atrg_stream

Crate atrg_stream 

Source
Expand description

Jetstream consumer wiring for at-rust-go.

Provides a bounded, backpressure-aware Jetstream consumer that spawns as a background task and delivers events to a user-supplied handler.

This crate is deliberately independent of atrg-core to avoid cyclic dependencies. It defines its own StreamConfig that atrg-core maps its JetstreamConfig into before calling spawn_consumer.

Re-exports§

pub use consumer::spawn_consumer;
pub use consumer::spawn_consumer_with_cursor;
pub use event::JetstreamEvent;
pub use metrics::JetstreamMetrics;
pub use router::CommitEvent;
pub use router::EventRouterBuilder;
pub use router::Operation;

Modules§

backoff
Exponential backoff with a configurable cap for reconnection.
consumer
Jetstream WebSocket consumer with bounded backpressure.
cursor
Cursor persistence for Jetstream consumer.
event
Jetstream event types.
metrics
Jetstream consumer metrics.
router
Ergonomic event router for dispatching Jetstream events by collection and operation.
zstd_dict
ZSTD dictionary auto-fetch and caching.

Structs§

StreamConfig
Configuration for the Jetstream consumer.

Type Aliases§

EventHandler
Type alias for event handler functions.