Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

num.partitions vs CreateTopicCommand.main(args)

$
0
0
Hi All,

In kafka.properties, I put (forgot to change):

num.partitions=1

While I create topics programatically:

String[] args = new String[]{
"--zookeeper", config.getString("zookeeper"),
"--topic", config.getString("topic"),
"--replica", config.getString("replicas"),
"--partition", config.getString("partitions")
};

CreateTopicCommand.main(args);

The performance engineer told me only one consumer thread is actively
working even I have 4 consumer threads started (could see when debugging or
in thread dump); and 4 partitions configured from the args.

It seems that num.partitions is still controlling the parallelism. Do I
need to change this num.partitions accordingly? Could I remove it? What is
I have different parallel requirement for different topic?

Thank you in advance!

Best Regards,
Mingtao

Viewing all articles
Browse latest Browse all 5648

Trending Articles