Set custom topic configs in NewTopic object at KafkaTopicProvisioner.class
See original GitHub issueCurrently it is impossible to pass any custom param to the topic creation method, and set the configs in the NewTopic
object.
We are trying to set the message.format.version
config in a topic level, when creating a topic.
Topic creation source code at KafkaTopicProvisioner
class
NewTopic newTopic = new NewTopic(topicName, effectivePartitionCount,
(short) configurationProperties.getReplicationFactor());
CreateTopicsResult createTopicsResult = adminClient.createTopics(Collections.singletonList(newTopic));
It would be helpful to define a yml configuration params for topics, such as it is with the producer and consumer.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Programmatically create Kafka topics using Spring Kafka
To create a Kafka topic programmatically introduce a configuration class that annotated with @Configuration : this annotation indicates that ...
Read more >Class NewTopic - Apache Kafka
Set the configuration to use on the new topic. Parameters: configs - The configuration map. Returns: This NewTopic object.
Read more >Spring Cloud Stream Kafka Binder Reference Guide
The list of custom headers that are transported by the binder. ... Binder's Kafka topic provisioner gives the highest precedence for the properties...
Read more >Kafka Topic Configurations for Confluent Platform
This topic provides configuration parameters available for Confluent Platform. The Apache Kafka® topic configuration parameters are organized by order of ...
Read more >Java Examples & Tutorials of NewTopic.configs (org.apache ...
Create a Kafka topic with the given parameters. * * @param topic The name of the topic. * @param partitions The number of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK. Let’s fix it on the framework level and forget my suggestion!
Thanks @artembilan, can you have a look at the same time at KafkaTopicProvisioner and its AdminClient relation?
Can the AdminClient be a Bean so it might be reused in other use cases? alternately can the client be auto closed after operations (or on idle time or some other policy) ? I think I have observed it “spiting” errors to the log in some cases, it probably doing stuff in the background…