Module rdkafka::mocking

source ·
Expand description

Mocking functionality

Provides a mock Kafka cluster with a configurable number of brokers that support a reasonable subset of Kafka protocol operations, error injection, etc.

There are two ways to use the mock clusters, the most simple approach is to configure test.mock.num.brokers (to e.g. 3) in an existing application, which will replace the configured bootstrap.servers with the mock cluster brokers.

This approach is convenient to easily test existing applications.

The second approach is to explicitly create a mock cluster by using MockCluster::new

Structs

  • Mock Kafka cluster with a configurable number of brokers that support a reasonable subset of Kafka protocol operations, error injection, etc.

Enums