Skip to main content

Crate reinhardt_streaming

Crate reinhardt_streaming 

Source
Expand description

Backend-agnostic streaming abstraction for reinhardt.

§Features

  • kafka — Kafka backend using rskafka (pure Rust, no C bindings)

The Kafka-backed TaskBackend lives in reinhardt-tasks behind its kafka-backend feature (not here).

§Direct API

use reinhardt_streaming::kafka::{KafkaConfig, KafkaProducer};

let config = KafkaConfig::new(vec!["localhost:9092"]);
let producer = KafkaProducer::connect(&config).await?;
producer.send("orders", &order).await?;

Re-exports§

pub use router::ConsumerFactory;
pub use router::StreamingHandlerKind;
pub use router::StreamingHandlerRegistration;
pub use router::StreamingRouter;
pub use backend::StreamingBackend;
pub use error::StreamingError;
pub use in_memory::InMemoryStreamingBackend;
pub use message::Message;

Modules§

backend
Backend trait abstraction for streaming providers.
error
Error types returned by streaming operations.
in_memory
In-memory streaming backend for tests and local execution.
macros
Streaming DSL helper macros.
message
Message envelope types used by streaming backends.
router
Router registration types for streaming handlers.

Macros§

streaming_routes
Build a StreamingRouter from a list of streaming handler identifiers.

Structs§

StreamingHandlerMetadata
Metadata about a streaming handler, submitted to inventory by #[producer]/#[consumer].

Traits§

StreamingTopicResolver
Type-safe streaming topic resolver trait.

Functions§

resolve_streaming_topic
Resolve the Kafka topic name for a streaming handler by its registered name.