Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

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.

Terminal window
# Describe a group's overrides
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type groups \
--entity-name payments \
--describe
# Change a group override
kafka-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 default
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type groups \
--entity-name payments \
--alter \
--delete-config consumer.session.timeout.ms

Validate 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.


These settings apply to groups using the consumer rebalance protocol:

Group settingKafka 4.4 defaultBroker default or bound
consumer.session.timeout.ms45000group.consumer.session.timeout.ms
consumer.heartbeat.interval.ms5000group.consumer.heartbeat.interval.ms
consumer.assignment.interval.ms1000group.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.


Group settingKafka 4.4 defaultPurpose
share.session.timeout.ms45000Detect failed share consumers
share.heartbeat.interval.ms5000Heartbeat interval sent to members
share.record.lock.duration.ms30000Initial record acquisition lock duration
share.delivery.count.limit5Maximum delivery attempts; valid range 2–10
share.partition.max.record.locks2000Maximum acquired records per partition; valid range 100–10000
share.auto.offset.resetlatestInitial offset: earliest, latest, or by_duration:<ISO-8601-duration>
share.isolation.levelread_uncommittedTransactional record visibility
share.renew.acknowledge.enabletruePermit the renew acknowledgement type
share.assignment.interval.ms1000Interval between assignment updates

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:

Terminal window
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=false
errors.deadletterqueue.topic.name.prefix=dlq.

Automatic creation is disabled by default. When it remains disabled:

  1. Create the DLQ topic explicitly.
  2. Ensure its name begins with errors.deadletterqueue.topic.name.prefix (default dlq.).
  3. Mark the topic as a share-group DLQ topic:
Terminal window
kafka-configs.sh --bootstrap-server kafka:9092 \
--entity-type topics \
--entity-name dlq.payments-workers \
--alter \
--add-config errors.deadletterqueue.group.enable=true

With errors.deadletterqueue.copy.record.enable=false (the default), Kafka writes the source context as headers without copying the original record data.


These settings apply to Kafka Streams applications using group.protocol=streams:

Group settingKafka 4.4 defaultPurpose
streams.session.timeout.ms45000Detect failed Streams clients
streams.heartbeat.interval.ms5000Heartbeat interval sent to members
streams.num.standby.replicas0Standby replicas for each task
streams.initial.rebalance.delay.ms3000Delay before the first assignment
streams.assignment.interval.ms1000Interval between assignment updates
streams.rack.aware.assignment.tagsemptyClient tags used to spread standby replicas
streams.assignor.namebroker defaultSelect 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.CustomTaskAssignor
group.streams.topology.description.plugin.class=com.example.kafka.TopologyDescriptionPlugin

The 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.