We don't want to go overboard, but since we're going to be using this in lots 
of downstream tests it'd be worth thinking about the public API. Have you 
thought about a builder API to make it easier to choose between different 
options rather than find a constructor that fits? Doing that would make it 
easier to add other options in the future, such as using multiple brokers 
and/or workers (e.g., for stopping some of them during tests), more easily 
setting individual properties, etc., without having to create a boatload of 
constructors or use setter methods that shouldn't be called after the workers 
are started.

```
EmbeddedConnectCluster.builder()
                      .name("MyCluster")
                      .withAvroConverters(schemaRegistryUrl)
                      .withProducerProp("batch.size", 10)
                      .withWorkers(3)
                      .withBrokers(3)
                      .build()
                      .start();
```

[ Full content available at: https://github.com/apache/kafka/pull/5516 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to