Monedula
Kafka guide contents

Markdown

Part VI · Reference

Kafka Improvement Proposal

KIP-1222: renew the lock on a record in a share group

Consumer groups and queues · Shipped · since Kafka 4.2 · status checked November 2026

KIP-1222 adds a RENEW acknowledgement for share groups. A consumer processing a record that takes longer than the acquisition lock can renew the lock, so the record stays with it instead of being handed to another consumer and processed twice. It works in explicit acknowledgement mode and arrived in Kafka 4.2.

Proposal
KIP-1222, Acquisition lock timeout renewal in share consumer explicit mode
Status
Shipped New in Kafka 4.2 (2026); the share.renew.acknowledge.enable switch came in 4.3 (KIP-1240).
Area
Consumer groups and queues
Renew extends the lock. At 1400ms - before the 1600ms deadline - the 'renew' group sent share_ack ackType=renew, pushing its lockExpiresAt from 1600 to 2400ms. 'norenew' did nothing; its lock still expires at 1600. Both records are still acquired at deliveryCount 1; only the renew group's deadline moved. Open this step in the full playground

Why it was needed

In a share group (KIP-932) each record is locked to one consumer for a fixed time, 30 seconds by default. If processing takes longer, the lock expires, the record goes back to the queue and another consumer gets it, so slow jobs were processed twice. Raising the lock time for everyone slowed down redelivery after real failures.

What it changes

The consumer acknowledges a record with the new type RENEW, which restarts the lock timer without changing the record's state. Renewals go out with the next commit or poll, and a consumer can ask how long the lock lasts. There is no limit on renewals, so a consumer that renews forever holds the record forever.

How to use it

  • Use explicit acknowledgement mode and acknowledge with AcknowledgeType.RENEW before the lock runs out; ShareConsumer.acquisitionLockTimeoutMs() tells you the lock length.
  • Since Kafka 4.3 the group config share.renew.acknowledge.enable (default true) can turn renewals off for a group.

Where it stands

Shipped in Kafka 4.2, the release in which share groups became production-ready. A client using RENEW against an older broker gets UnsupportedVersionException.

What comes next

Share groups keep gaining features in follow-up KIPs, such as the dead-letter queue of KIP-1191 in Kafka 4.4.

See it in the simulator

Sources

All Kafka KIPs