Lenses gives the ability to tailor your topic management. You can enable or restrict users to perform different operations based on granular permissions based on namespaces.
There are different supported operations for the users like:
Read in Kafka Topics & Schemas
In Lenses, you can allow users to create topics or topic requests. To help users follow your topic strategy, or prevent them from adding values that may be impacting your cluster, you can optionally add Topic Settings for important configurations. Additionally, you can enforce your topic naming strategy by adding rules on the pattern or custom regular expressions.
Topic Settings are Lenses settings for Kafka Topics on top of your native Kafka topics configurations. The Topic Settings are empty by default, and they take precedence when Topic Creation is applied via Lenses UI/CLI/API/.
Under certain circumstances, the Topic Settings configured through Lenses might no longer be applicable. For instance, if you set a min replication factor of 3, but the number of active brokers in your Kafka cluster suddenly drops to 2, your settings will enter into an un-applicable state. When this happens, Lenses will lock all API calls around topic creation and configuration until this inconsistency is addressed. This can be done either by bringing the third broker back up, or by decreasing the minimum replication factor to 2.
The following command can be used to retrieve the Topics Settings details. Output can be either JSON or YAML.
JSON
YAML
lenses-cli topic-settings --output="JSON"
Use the following command to update the topic settings policies:
lenses-cli topic-settings update \ --partitions-min 1 --partitions-max 3 \ --replication-min 1 --replication-max 2 \ --retention-size-default -1 --retention-size-max -1 \ --retention-time-default -1 --retention-time-max -1 \ --naming-pattern="[a-zA-Z]*" --naming-description="Only letters ([a-zA-Z]*)"
Export/Import
To import or export topic settings policies:
lenses-cli export topic-settings --dir="DIRECTORY-PATH" lenses-cli import topic-settings --dir="DIRECTORY-PATH"
Learn about the CLI
Under Topic Name, one can set the value of “Custom” for the characters allowed and provide their own regular expression string and description. The description will be used as a naming hint when creating new topics.
Topic settings policies take precedence over Kafka Broker defaults. By default the policies are empty.
On this page