Producer and Consumer
APIs. Two top-level structs govern the write and read sides:
ProducerConfig and ConsumerConfig. Both share the same
ObjectStoreConfig from the common crate.
The structs derive Serialize/Deserialize so host services may embed
them in their own config formats, but the canonical surface documented
here is the Rust API.
ProducerConfig
Controls where data batches and the queue manifest are written, how often
batches are flushed, and when backpressure is applied.
ConsumerConfig
Controls where the queue manifest and data batches are read from, and
how stale batches are garbage collected.
ObjectStoreConfig
A tagged enum re-exported from the common crate. Three variants are
available:
- Local filesystem
- AWS S3
- In-memory
CompressionType
Pairing producers and consumers
A producer and the consumer that drains it must agree on three values:object_storemust point at the same bucket or directory.manifest_pathmust be identical, since it identifies the queue.data_path_prefixmust be identical, since the manifest stores batch locations relative to it.
Examples
- Local development
- Production (S3)
- Testing (in-memory)