Redis Stream GroupCreate

Redis Stream GroupCreate

Certified

Create a consumer group on a Redis stream

Runs XGROUP CREATE so that ReadGroup and Ack have a group to work with.

startId decides what the group considers already handled and is never guessed: $ starts the group at the current end of the stream so only entries added afterwards are delivered, while 0 replays the whole retained backlog. Any explicit stream ID is also accepted, so a group can start just after a known entry.

The task is safe to run on every execution: XGROUP CREATE fails with BUSYGROUP once the group exists, and ignoreExisting (on by default) turns that into a no-op while created reports whether this run actually created the group. makeStream adds MKSTREAM, which creates an empty stream when the key does not exist yet, instead of failing on a missing key.

yaml
type: io.kestra.plugin.redis.stream.GroupCreate

Create a consumer group that only receives entries added after the group was created.

yaml
id: redis_stream_group_create
namespace: company.team

tasks:
  - id: create_group
    type: io.kestra.plugin.redis.stream.GroupCreate
    url: "{{ secret('REDIS_URI') }}"
    key: orders
    group: billing
    startId: "$"

Create a consumer group that replays the whole retained backlog of the stream.

yaml
id: redis_stream_group_create_backlog
namespace: company.team

tasks:
  - id: create_group
    type: io.kestra.plugin.redis.stream.GroupCreate
    url: "{{ secret('REDIS_URI') }}"
    key: orders
    group: billing_backfill
    startId: "0"
Properties

Consumer group name

Rendered group name passed to XGROUP CREATE.

Redis stream key

Rendered key passed to XGROUP CREATE.

Redis connection string

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulttrue

Succeed when the group already exists

Defaults to true, which turns the BUSYGROUP error of a second run into a no-op and leaves the existing group untouched, including its current position and pending entries. Set to false to fail instead. The created output tells the two cases apart.

Defaulttrue

Create the stream when the key is missing

Defaults to true, which adds MKSTREAM so an empty stream is created instead of failing on a missing key. Set to false to require the stream to exist already.

Default$

Stream ID the group starts from

Defaults to $: the group is positioned at the current end of the stream, so it only receives entries added after this task ran and the existing backlog is treated as already handled. Use 0 to deliver the whole retained backlog instead, or any explicit stream ID (for example 1700000000000-0) to start right after that entry. Entries trimmed out of the stream are never delivered, whatever the value.

Whether this run created the group

False when the group already existed and ignoreExisting is true.

Consumer group name

Stream key the group was created on

Stream ID the group was requested to start from