Apache Kafka ConsumerGroupAlterOffsets

Apache Kafka ConsumerGroupAlterOffsets

Certified

Alter committed offsets of a Kafka consumer group

Overwrites the committed offset for one or more topic partitions of a consumer group using the Kafka AdminClient, typically to replay or skip records. Fails with GroupNotEmptyException if the group has active members — stop its consumers first.

yaml
type: io.kestra.plugin.kafka.ConsumerGroupAlterOffsets

Rewind a stalled consumer group to reprocess from an earlier offset

yaml
id: kafka_consumer_group_alter_offsets
namespace: company.team

tasks:
  - id: alter_offsets
    type: io.kestra.plugin.kafka.ConsumerGroupAlterOffsets
    properties:
      bootstrap.servers: localhost:9092
    groupId: tenant-acme-orders-processor
    offsets:
      - topic: tenant_acme_orders
        partition: 0
        offset: 1000
Properties

Consumer group ID

Offsets to set

One entry per topic partition to overwrite. Can be a static list or a Pebble expression resolving to a list, for example the offsets output of ConsumerGroupDescribe.

Definitions
offset*Requiredintegerstring

Offset to set

partition*Requiredintegerstring

Partition number

topic*Requiredstring

Topic name

Kafka AdminClient properties

Must include bootstrap.servers; accepts any Kafka AdminClient config. Provide base64-encoded content for ssl.keystore.location and ssl.truststore.location when using SSL.

Reference (ref) of the pluginDefaults to apply to this task.

DefaultPT30S

AdminClient call timeout

Maximum duration to wait for each AdminClient operation to complete before failing the task. Defaults to PT30S (30 seconds).

SubTypeobject

Offsets that were set

Each entry contains topic, partition and offset.

Consumer group ID