Get the App
SLTechnology News&Howtos  ›  Servers  › 

Kafka production data cannot be evenly distributed to each partition

Shulou Source: shulou.com Published: 2022-06-03 07:59:24 12月06日 Update

kafka Producer data is uneven and cannot be evenly distributed to each partition, which easily causes consumption backlog. The reason for this is that the producer uses a fixed key.

solutions

if you set key,key, don't use a few fixed constants.

Without key, it will be randomly distributed to partitions; it will be evenly distributed; it is recommended to have a value with business meaning, such as order number.

Normally, the data should be evenly distributed on each partition.

Tags: Data production producer business cause meaning constant suggestion situation solution solution order number allocation consumption backlog Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno MySQL Apple Huawei