nerdexam
Confluent

CCDAK · Question #182

Your application is consuming from a topic with one consumer group. The number of running consumers is equal to the number of partitions. Application logs show that some consumers are leaving the…

The correct answer is B. Increase session.timeout.ms property. Increasing the session.timeout.ms property gives consumers more time to process messages and send heartbeats before being considered dead by the consumer group, reducing unnecessary rebalances.

Developing Kafka Consumers

Question

Your application is consuming from a topic with one consumer group. The number of running consumers is equal to the number of partitions. Application logs show that some consumers are leaving the consumer group during peak time, triggering a rebalance. You also notice that your application is processing many duplicates. You need to stop consumers from leaving the consumer group. What should you do?

Options

  • AReduce max.poll.records property.
  • BIncrease session.timeout.ms property.
  • CAdd more consumers instances.
  • DSplit consumers in different consumer groups.

How the community answered

(21 responses)
  • A
    10% (2)
  • B
    67% (14)
  • C
    5% (1)
  • D
    19% (4)

Explanation

Increasing the session.timeout.ms property gives consumers more time to process messages and send heartbeats before being considered dead by the consumer group, reducing unnecessary rebalances.

Topics

#consumer rebalance#session.timeout.ms#consumer lag#duplicate processing

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice