THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
To make it easier for users to provide their custom implementation of Admin, the KIP will introduce ForwardingAdmin
class delegate to KafkaAdminClient.
The implemented class can be overridden using the following configurations.
...
Code Block | ||||
---|---|---|---|---|
| ||||
public class ForwardingAdmin implements Admin { private final Admin delegate; public ForwardingAdmin(Map<String, Object> config, Admin delegate) { this.delegate = delegate; } public ForwardingAdmin(Map<String, Object> config) { this.delegate = AdminClient.create(config); } @Override @Override public CreateTopicsResult createTopics(Collection<NewTopic> newTopics, CreateTopicsOptions options) { return delegate.createTopics(newTopics, options); } // override rest of Admin interface to use delegate... } |
...