kafka Partition Strategy

asked 2020-08-27 23:31:03 -0600

Dean Han gravatar image

updated 2020-08-27 23:37:25 -0600

Hi Experts,

I have a question about 'Kafka partition strategy' in stage 'Kafka producer'.

There are 3 strategies here, 'Random', 'Round Robin', 'Expression'.

It is easy to understand 'Random' and 'Expression'.

For 'Round Robin', considered if 'Max Batch Size (Records)' was set to 1 in stage 'Origin', how will Round Robin work? For example, if the total topic partition is 10, the 1st record in 1st batch will be sent to partition 1, will the next 1 record in 2nd batch be sent to partition 2 or still partition 1?
If still sent to partition 1, I think Kafka partition will be useless under 'Max Batch Size (Records)=1' 's condition, because every record will be sent to partition 1.

Thanks. BR//Dean

edit retag flag offensive close merge delete