You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Malte Maltesmann <ma...@gmail.com> on 2018/08/02 14:14:58 UTC

AdminClient: Restore default configuration for topic

Hi,

I'd like to restore a configuration for a topic which was previously
overriden with the AdminClient provided in the kafka-client library.

For example if I create a topic "test-topic" with the configuration "
delete.retention.ms=86400001", I'd like to be able to reset this
configuration to default afterwards, without even knowing the default.

I thougth this would be possible by passing null as value to the
configuration property I would like to reset, but that gives me a
NullPointerException on the Broker.

With the kafka-config I can easily achieve this by executing:
./kafka-configs.sh --entity-type topics --entity-name test-topic
--zookeeper localhost:2181 --delete-config delete.retention.ms --alter

Is this even possible with AdminClient?

Best regards
Malte