[
https://issues.apache.org/jira/browse/KAFKA-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152016#comment-14152016
]
Sriharsha Chintalapani commented on KAFKA-1658:
-----------------------------------------------
[~aartigupta] In Kafka 0.8.1.1 if auto.create.topic.enable set to false broker
won't create new topics.
If you want to set num.partitions for the auto created topics you should add
that config in server.properties
"num.partitions " more info here https://kafka.apache.org/08/configuration.html.
At this point we don't have a way to override the auto created topic partitions
from producer config.
There is work being done as part of this
https://issues.apache.org/jira/browse/KAFKA-1507 to add the producer side
config for auto created topics.
> Overriding #of partitions per topic, does not take effect
> ---------------------------------------------------------
>
> Key: KAFKA-1658
> URL: https://issues.apache.org/jira/browse/KAFKA-1658
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8.1.1
> Environment: Ubuntu
> Reporter: aarti gupta
>
> Tried to change the # of partitions per topic, (for a non existent topic), by
> adding the following settings to the producer
> properties.put("num.partitions","3");
> properties.put("topic.partition.count.map", "3");
> ProducerConfig producerConfig = new ProducerConfig(properties);
> producer = new Producer<String, String>(producerConfig);
> Also set properties.put("auto.create.topics.enable", "false"); (tried
> without that first)
> The default # of partitions as specified in the server.properties (i.e. 1)
> still come into effect.
> I also wanted to change the replication factor, (for a non existent topic),
> properties.put("default.replication.factor", "3"); on the producer
> config did not work
> Is this expected behavior? The documentation suggests that we use the command
> line tool, but I want to control this dynamically. Any suggestions?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)