Skip to main content

ruststream_rdkafka/testing/
mod.rs

1//! In-process test broker, behind the `testing` feature.
2//!
3//! [`KafkaTestBroker`] follows the same ladder as the real broker and implements the core
4//! `TestableBroker` contract on its connected form, over an in-memory router, so application
5//! handlers wired against Kafka descriptors can be exercised without a cluster: messages fan
6//! out synchronously to subscribers matched by exact topic name. The real
7//! [`KafkaPublish`](crate::KafkaPublish) policy pairs against it too, so include sites need no
8//! test-only variant.
9//!
10//! Scope: topic-name routing, settlement, headers, and the partition-key header. Consumer
11//! groups, partitions, committed offsets, start offsets, rebalancing, and everything
12//! transactional (transactions and the exactly-once pipeline) are transport behavior; exercise
13//! them against a real cluster (see the crate's integration tests and `KAFKA_TEST_URL`).
14
15mod broker;
16mod publisher;
17mod router;
18mod subscriber;
19
20pub use broker::{ConnectedKafkaTestBroker, KafkaTestBroker};
21pub use publisher::KafkaTestPublisher;
22pub use subscriber::{KafkaTestMessage, KafkaTestSubscriber};