If I have an application that publishes events on a kafka topic and my consumers need to read the data in the order they were published, then my topic can have only one partition, since kafka guarantees ordering only within partitions.
However, I read that kafka uses partitioning to provide scalability, i.e. by placeing partitions of a topic on several brokers. I also read, that a partition itself can not be split.
Since ordering is only possible within a partition, is scalability a problem for my application? Is there a way to deal with this problem or is my understanding of Kafka not right?
Imagine my application has thousands of consumers (each in a single group so everyone consumes the published events). All need to read data from that single topic with that single partition.
EDIT: Another thing that comes to my mind is: Imagine having 5 partitions of that topic, and all consumers must still read the right ordering. If the publishers dont specify an partition id or a key, then kafka will publish the information round-robin on the 5 partitions right?
If all consumers are in a single group and all subscribe to the topic, then each consumer reads events of all topics, which means that they would still get the ordered messages, right?