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!