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§
- Connected
Kafka Test Broker - The connected form of
KafkaTestBroker. - Kafka
Test Broker - In-process broker for application tests: same descriptors, no Kafka cluster.
- Kafka
Test Message - One in-process delivery.
- Kafka
Test Publisher - Publisher into the in-process router.
- Kafka
Test Subscriber - In-process subscriber on one topic name.