Skip to main content

Module testing

Module testing 

Source
Expand description

In-process test broker, behind the testing feature.

KafkaTestBroker implements the core TestableBroker contract over an in-memory router so application handlers wired against Kafka descriptors can be exercised without a cluster: messages fan out synchronously to subscribers matched by exact topic name.

Scope: topic-name routing, settlement, headers, and the partition-key header. Consumer groups, partitions, committed offsets, start offsets, and rebalancing are transport behavior; exercise them against a real cluster (see the crate’s integration tests and KAFKA_TEST_URL).

Structs§

KafkaTestBroker
In-process broker for application tests: same descriptors, no Kafka cluster.
KafkaTestMessage
One in-process delivery.
KafkaTestPublisher
Publisher into the in-process router.
KafkaTestSubscriber
In-process subscriber on one topic name.