Skip to main content

Module testing

Module testing 

Source
Expand description

In-process test broker, behind the testing feature.

KafkaTestBroker follows the same ladder as the real broker and implements the core TestableBroker contract on its connected form, 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. The real KafkaPublish policy pairs against it too, so include sites need no test-only variant.

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

Structs§

ConnectedKafkaTestBroker
The connected form of KafkaTestBroker.
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.