Redis Streams Endpoint

Use Redis Streams for producer and consumer correlation with consumer groups and stream retention controls.

Core Fields

Configure ConnectionString, StreamKey, and Mode. ConsumerGroup and ConsumerName are required for consume mode so LoadStrike can read and acknowledge stream entries deterministically.

Read Behavior

Use StartFromEarliest to control first-read position and ReadCount to bound batch size per poll. This keeps stream polling predictable under sustained correlation workloads.

Retention And Payload Shape

MaxLength can be used to cap stream growth on produce. Payloads are stored with body, content-type, and header:* fields so tracking selectors can still read from headers or body.

Tracking Extraction

TrackingField and optional GatherByField use the same header/json selector syntax as other endpoints. MessagePayloadType and serializer settings are used when tracking id lives in the stream body.

Feature Usage Samples

How to use snippets for Redis Streams Endpoint.

Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.

Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.

Redis Streams Endpoint

var endpoint = new RedisStreamsEndpointDefinition
{
    Name = "redis-stream-out",
    Mode = TrafficEndpointMode.Consume,
    TrackingField = TrackingFieldSelector.Parse("json:$.trackingId"),
    ConnectionString = "localhost:6379",
    StreamKey = "orders.completed",
    ConsumerGroup = "loadstrike-orders",
    ConsumerName = "consumer-1",
    ReadCount = 50
};

Body Example

ConnectionString

Specifies how the adapter connects to Redis.

StreamKey

Specifies the Redis stream key used for produce or consume mode.

ConsumerGroup

Specifies the Redis consumer group used for coordinated stream reads.

ConsumerName

Identifies the current reader inside the Redis consumer group.

ReadCount

Controls how many stream entries the adapter asks for in one polling cycle.

{ "trackingId": "trk-1", "status": "completed" }

Diagram

Redis Streams endpoint correlation diagram
Redis Streams endpoints preserve headers and body payloads so tracking selectors can correlate stream entries downstream.