Back pressure in Kafka

前端 未结 2 424
走了就别回头了
走了就别回头了 2021-01-12 11:45

I have a situation in Kafka where the producer publishes the messages at a very higher rate than the consumer consumption rate. I have to implement the back pressure impleme

2条回答
  •  爱一瞬间的悲伤
    2021-01-12 12:15

    You can disable auto-commit by enable.auto.commit=false on consumer and commit only when consumer operation is finished. That way consumer would be slow, but Kafka knows how many messages consumer processed, also configuring poll interval with max.poll.interval.ms and messages to be consumed in each poll with max.poll.records you should be good.

提交回复
热议问题