Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Connect and MirrorMaker's integration test use `EmbeddedKafkaCluster` and `EmbeddedConnectCluster` to setup connect cluster during testing. Both classes are easy to setup if the test needs vanilla clusters, however, it's a lot of work to make it set it up with more advanced config (for example authentication and authorization) where admin, consumer and producer clients need more configuration.
1. I am proposing adding extra parameter `additionalClientConfigs` to `EmbeddedKafkaCluster` constructor. The new parameter will be used
- Setup Producer Client in `EmbeddedKafkaCluster.doStart` which is initializing `producer` client that is used in `EmbeddedKafkaCluster.produce`
- Setup Producer Client in `EmbeddedKafkaCluster.createProducer` used in `EmbeddedKafkaCluster.transactionalProducer`
- Setup Admin Client in `EmbeddedKafkaCluster.createAdminClient` used in `EmbeddedKafkaCluster.createTopic`, `EmbeddedKafkaCluster.consumeAll`, `EmbeddedKafkaCluster.describeTopics` and `EmbeddedKafkaCluster.deleteTopic`
- Setup Consumer Client in `EmbeddedKafkaCluster.createConsumer` used in `EmbeddedKafkaCluster.createConsumerAndSubscribeTo` and `EmbeddedKafkaCluster.consumeAll`
2. And add `EmbeddedConnectCluster.Builder.additionalKafkaClusterClientConfigs`.
Tests impacted by this
- MirrorMaker integration tests
- `org.apache.kafka.connect.integration.ExactlyOnceSourceIntegrationTest`
Attachments
Issue Links
- links to