0

Background: I have set default number of partitions=1 and replication factor=3 in my kafka server.properties file and have enabled topic creation. Kafka cluster is running with both authentication and authorization. There are topic for which I have given permissions to only one user for create,read,write and the permissions is based on a topic prefix like foo.. This user has permissions to create and consumer from topics which start with foo. Now, I want to create all the foo. topics with default partition=3 and replication factor=6 (this is different from global default in server properties). The topic creation is dynamic and the names are not known beforehand.

Question: Is it possible to specify different default partitions and replication factor for topics of type foo.*? If not what is the best way to achieve this from producer point of view?

I know of KafkaAdmin utils but the topic creation will happen on producer and I don't want to give admin permissions on metadata stored in zookeeper to the user running the producer for security reasons.

Thanks!

xabhi
  • 798
  • 1
  • 13
  • 30

1 Answers1

0

There is no such property like this. You would have to make some topic creation proxy thing to allow custom logic like this.

Or write a Kafka Improvement Proposal (KIP), and maybe the feature can be added ;)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245