zeebe-redis-connector 1.0.9-rc1

This is a prerelease version of zeebe-redis-connector.
There is a newer version of this package available.
See the version list below for details.
dotnet add package zeebe-redis-connector --version 1.0.9-rc1
                    
NuGet\Install-Package zeebe-redis-connector -Version 1.0.9-rc1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="zeebe-redis-connector" Version="1.0.9-rc1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="zeebe-redis-connector" Version="1.0.9-rc1" />
                    
Directory.Packages.props
<PackageReference Include="zeebe-redis-connector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add zeebe-redis-connector --version 1.0.9-rc1
                    
#r "nuget: zeebe-redis-connector, 1.0.9-rc1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package zeebe-redis-connector@1.0.9-rc1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=zeebe-redis-connector&version=1.0.9-rc1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=zeebe-redis-connector&version=1.0.9-rc1&prerelease
                    
Install as a Cake Tool

C# Zeebe Redis Connector

This library enables the retrieval of Zeebe events with C#. It is based on StackExchange.Redis and requires the configuration of the Zeebe Exporter as described in the main project on Camunda Community Hub (camunda-community-hub/zeebe-redis-exporter).

Current limitations:

  • The connector uses a Multi-key operation to receive events from Redis and thus does not yet work with Redis Clusters.
  • StackExchange.Redis does not yet support blocking operations - hence this library is forced to use polling.
  • It is - not yet - possible to configure a stream prefix other than the default. For now this is hardwired to zeebe:.

Requirements

Usage

The Zeebe Redis Connector extension is available via nuget (https://www.nuget.org/packages/zeebe-redis-connector/).

Bootstrap

The library provides an extension IServiceCollection.AddZeebeRedis(...) for hosted services in order to bootstrap the connector. It requires ZeebeRedisOptions.

You can either wire your options manually

ConfigureServices((hostContext, services) => {
    services.AddZeebeRedis(options => {
        options.RedisConfigString = "localhost";
        options.RedisConsumerGroup = "my-consumer-group";
        options.RedisPollIntervallMillis = 500;
    })
    .AddSingleton<ZeebeRedisListener>()
    .AddHostedService(p => p.GetRequiredService<ZeebeRedisListener>());
})

or use a corresponding configuration section

ConfigureServices((hostContext, services) => {
    services.AddZeebeRedis(
        hostContext.Configuration.GetSection("ZeebeRedisConfiguration")
    })
    .AddSingleton<ZeebeRedisListener>()
    .AddHostedService(p => p.GetRequiredService<ZeebeRedisListener>());
})

with

{
  "ZeebeRedisConfiguration": {
    "RedisConfigString": "localhost",
    "RedisConsumerGroup": "my-csharp-consumer",
    "RedisPollIntervallMillis" : 500
  }
}

Lastly, it is also possible to use environment variables:

ConfigureServices((hostContext, services) => {
    services.AddZeebeRedis()
    .AddSingleton<ZeebeRedisListener>()
    .AddHostedService(p => p.GetRequiredService<ZeebeRedisListener>());
})
Environment Parameter Description
REDIS_CONFIG_STRING Redis URL as required by StackExchange.Redis. Default: localhost
REDIS_CONSUMER_GROUP The consumer group. Default: empty
REDIS_POLL_INTERVALL_MILLIS Poll interval in milliseconds. Default: 500

Environment variables always have precedence over other ways of configuration.

Hint: It is strongly recommended to set the consumer group name. Otherwise, you will get a unique disposable group generated at startup.

Registering Zeebe Event Listeners

By injecting ZeebeRedis in one of your services you're able to register listeners for specific events. Registering listeners should happen before the startup of your application - e.g. in the constructor of an IHostedService.

public class ZeebeRedisListener : IHostedService
{
    public ZeebeRedisListener(ZeebeRedis zeebeRedis) {
        zeebeRedis
            .AddDeploymentListener((deployment) => ReceiveDeploymentRecord(deployment))
            .AddIncidentListener((incident) => ...)
            .AddJobListener((job) => ...)
            ...
            ;
    }

    public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;

    private void ReceiveDeploymentRecord(DeploymentRecord deploymentRecord)
    {
        ...
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 92 8/22/2025
2.0.1 141 8/14/2025
2.0.0 153 7/15/2025
1.1.0 256 6/13/2025
1.0.9-rc7 253 6/13/2025
1.0.9-rc6 294 6/12/2025
1.0.9-rc5 286 6/12/2025
1.0.9-rc4 284 6/12/2025
1.0.9-rc3 299 6/11/2025
1.0.9-rc2 287 6/11/2025
1.0.9-rc1 285 6/11/2025
1.0.8 162 5/28/2025
1.0.7 117 5/23/2025
1.0.6 110 5/23/2025
1.0.5 167 5/22/2025
1.0.4 155 5/21/2025
1.0.3 138 3/21/2025
1.0.2 129 2/12/2025
1.0.1 1,216 10/23/2024
1.0.0 933 5/13/2024
0.9.11 196 2/29/2024