Kafka producer TimeoutException: Expiring 1 record(s)

前端 未结 1 1229
情深已故
情深已故 2020-12-16 11:25

I am using Kafka with Spring-boot:

Kafka Producer class:

@Service
public         


        
相关标签:
1条回答
  • 2020-12-16 12:11

    There are 3 possibilities:

    1. Increase request.timeout.ms - this is the time that Kafka will wait for whole batch to be ready in buffer. So in your case if there are less than 100 000 messages in buffer, timeout will occur. More info here: https://stackoverflow.com/a/34794261/2707179
    2. Decrease batch-size - related to previous point, it will send batches more often but they will include fewer messages.
    3. Depending on message size, maybe your network cannot catch up with high load? Check if your throughput is not a bottleneck.
    0 讨论(0)
提交回复
热议问题