Default Number of Partitions in New Topics

When you create or edit a stream, the -defaultpartitions parameter determines how many partitions are created in each new topic in the stream. If you do not explicitly set this value, each new topic is created with one partition.

Topics that are created automatically start with the default number of partitions that was set for the stream. However, you can use the command maprcli stream topic edit to increase the number of partitions.

When deciding how many partitions to create by default for new topics in a stream, consider the expected volume of messages that will be published to the topics in the stream. High message volumes can be handled more efficiently by multiple consumers in consumer groups reading from multiple partitions than by a individual consumers each reading from a single partition.

If you want to add partitions to a topic yourself at runtime, perhaps after checking the rate of throughput for a topic, you can use the command maprcli stream topic edit.