0
0
Kafkadevops~5 mins

Consumer configuration in Kafka - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the group.id configuration in Kafka consumer?
The group.id identifies the consumer group this consumer belongs to. Consumers in the same group share the work of consuming topics, allowing for load balancing and fault tolerance.
Click to reveal answer
beginner
What does the auto.offset.reset setting control in Kafka consumer configuration?
It controls what happens when there is no initial offset or if the current offset is invalid. Common values are earliest (start from the beginning) or latest (start from the end).
Click to reveal answer
intermediate
Explain the role of enable.auto.commit in Kafka consumer configuration.
This setting controls whether the consumer automatically commits offsets periodically. If true, offsets are committed automatically; if false, the application must commit offsets manually.
Click to reveal answer
intermediate
What is the effect of setting max.poll.records in Kafka consumer?
It limits the maximum number of records returned in a single call to poll(). This helps control the batch size for processing and can affect latency and throughput.
Click to reveal answer
intermediate
Why is session.timeout.ms important in Kafka consumer configuration?
It defines the time the consumer can be out of contact with the Kafka broker before being considered dead. This helps Kafka detect failed consumers and trigger rebalancing.
Click to reveal answer
What does setting enable.auto.commit to false mean?
AThe consumer will not consume any messages.
BThe consumer will commit offsets automatically.
CThe consumer will not commit offsets automatically; manual commit is required.
DThe consumer will reset offsets to earliest.
Which configuration controls the consumer group a Kafka consumer belongs to?
Agroup.id
Bauto.offset.reset
Cmax.poll.records
Dsession.timeout.ms
If you want a consumer to start reading from the beginning of a topic when no offset is found, which auto.offset.reset value should you use?
Aearliest
Bnone
Clatest
Dauto
What does max.poll.records affect in Kafka consumer?
AThe maximum number of consumer groups.
BThe maximum number of messages fetched in one poll call.
CThe maximum size of a message.
DThe maximum time to wait for a poll.
Why is session.timeout.ms important?
AIt sets the timeout for message processing.
BIt sets the maximum poll interval.
CIt controls the offset commit interval.
DIt defines how long a consumer can be silent before considered dead.
Describe the key Kafka consumer configuration settings needed to manage offset commits and consumer group membership.
Think about how Kafka tracks what messages a consumer has read and how consumers work together.
You got /4 concepts.
    Explain how max.poll.records and session.timeout.ms affect consumer performance and reliability.
    Consider how many messages are processed at once and how Kafka knows if a consumer is alive.
    You got /4 concepts.