Kafka Group Configuration
Kafka supports dynamic configuration on an individual consumer, share, or Streams group. Group-level values override the corresponding broker defaults for that group.
# Describe a group's overrideskafka-configs.sh --bootstrap-server kafka:9092 \ --entity-type groups \ --entity-name payments \ --describe
# Change a group overridekafka-configs.sh --bootstrap-server kafka:9092 \ --entity-type groups \ --entity-name payments \ --alter \ --add-config consumer.session.timeout.ms=50000
# Return a property to the broker defaultkafka-configs.sh --bootstrap-server kafka:9092 \ --entity-type groups \ --entity-name payments \ --alter \ --delete-config consumer.session.timeout.msValidate group type and bounds
Use only settings that apply to the group's protocol. Timeout and interval overrides must remain inside the minimum and maximum bounds configured on the brokers.
Consumer Group Settings
Section titled “Consumer Group Settings”These settings apply to groups using the consumer rebalance protocol:
| Group setting | Kafka 4.4 default | Broker default or bound |
|---|---|---|
consumer.session.timeout.ms | 45000 | group.consumer.session.timeout.ms |
consumer.heartbeat.interval.ms | 5000 | group.consumer.heartbeat.interval.ms |
consumer.assignment.interval.ms | 1000 | group.consumer.assignment.interval.ms |
The broker bounds session timeout with group.consumer.min.session.timeout.ms and group.consumer.max.session.timeout.ms. It bounds heartbeat interval with the corresponding group.consumer.min.* and group.consumer.max.* settings.
Share Group Settings
Section titled “Share Group Settings”| Group setting | Kafka 4.4 default | Purpose |
|---|---|---|
share.session.timeout.ms | 45000 | Detect failed share consumers |
share.heartbeat.interval.ms | 5000 | Heartbeat interval sent to members |
share.record.lock.duration.ms | 30000 | Initial record acquisition lock duration |
share.delivery.count.limit | 5 | Maximum delivery attempts; valid range 2–10 |
share.partition.max.record.locks | 2000 | Maximum acquired records per partition; valid range 100–10000 |
share.auto.offset.reset | latest | Initial offset: earliest, latest, or by_duration:<ISO-8601-duration> |
share.isolation.level | read_uncommitted | Transactional record visibility |
share.renew.acknowledge.enable | true | Permit the renew acknowledgement type |
share.assignment.interval.ms | 1000 | Interval between assignment updates |
Share-Group Dead-Letter Queues
Section titled “Share-Group Dead-Letter Queues”Kafka 4.4+
Share-group DLQ configuration was introduced in Kafka 4.4. It requires the cluster feature share.version at level 2 or later.
Configure the group with a DLQ topic and decide whether to include the original record:
kafka-configs.sh --bootstrap-server kafka:9092 \ --entity-type groups \ --entity-name payments-workers \ --alter \ --add-config 'errors.deadletterqueue.topic.name=dlq.payments-workers,errors.deadletterqueue.copy.record.enable=true'Cluster-wide broker settings control automatic creation and the required topic-name prefix:
errors.deadletterqueue.auto.create.topics.enable=falseerrors.deadletterqueue.topic.name.prefix=dlq.Automatic creation is disabled by default. When it remains disabled:
- Create the DLQ topic explicitly.
- Ensure its name begins with
errors.deadletterqueue.topic.name.prefix(defaultdlq.). - Mark the topic as a share-group DLQ topic:
kafka-configs.sh --bootstrap-server kafka:9092 \ --entity-type topics \ --entity-name dlq.payments-workers \ --alter \ --add-config errors.deadletterqueue.group.enable=trueWith errors.deadletterqueue.copy.record.enable=false (the default), Kafka writes the source context as headers without copying the original record data.
Streams Group Settings
Section titled “Streams Group Settings”These settings apply to Kafka Streams applications using group.protocol=streams:
| Group setting | Kafka 4.4 default | Purpose |
|---|---|---|
streams.session.timeout.ms | 45000 | Detect failed Streams clients |
streams.heartbeat.interval.ms | 5000 | Heartbeat interval sent to members |
streams.num.standby.replicas | 0 | Standby replicas for each task |
streams.initial.rebalance.delay.ms | 3000 | Delay before the first assignment |
streams.assignment.interval.ms | 1000 | Interval between assignment updates |
streams.rack.aware.assignment.tags | empty | Client tags used to spread standby replicas |
streams.assignor.name | broker default | Select a registered broker-side assignor by short name |
Kafka 4.4+
Kafka 4.4 added custom broker-side Streams task assignors. Register implementations with group.streams.assignors, then select one for a group with streams.assignor.name. Changing the name takes effect at the next rebalance; it does not trigger one.
Kafka 4.4 also added an optional topology-description plugin:
group.streams.assignors=sticky,com.example.kafka.CustomTaskAssignorgroup.streams.topology.description.plugin.class=com.example.kafka.TopologyDescriptionPluginThe topology-description feature is disabled when group.streams.topology.description.plugin.class is unset. Apache Kafka includes an in-memory reference implementation for testing, but it is not suitable for production because its data is neither persistent nor shared among brokers.