Skip to content

Add RENEW acknowledgment type to ShareAcknowledgment #4322

@sobychacko

Description

@sobychacko

KIP-1222 (Apache Kafka 4.2) added AcknowledgeType.RENEW — a fourth ack type that extends the acquisition lock on a record when processing takes longer than group.share.record.lock.duration.ms (default 30s). Without it, long-running records time out and are redelivered to another consumer.

ShareAcknowledgment exposes acknowledge() (ACCEPT), release() (RELEASE), and reject() (REJECT). AcknowledgeType.RENEW is not wired through currently.

Changes needed

  1. Add renew() to ShareAcknowledgment
  2. Add the corresponding override in ShareConsumerAcknowledgment mapping to AcknowledgeType.RENEW
  3. Update ShareAcknowledgment Javadoc to list RENEW

RENEW is non-terminal — it resets the lock timer but a terminal ack (ACCEPT, RELEASE, or REJECT) is still required afterward. acknowledgeInternal() currently uses compareAndSet(null, type) which prevents any second call on the same record. This needs to allow RENEW followed by a terminal acknowledgment.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions