Skip to content

[Host.Redis] Redis consumer doesn't process events after reconnect #419

@cyril265

Description

@cyril265

Hello

the issue appears when the consumer app briefly loses the connection to redis. After that no events are processed by the consumer until you restart it.

to reproduce:

  • start producer and consumer
  • send an event (works)
  • close and open the redis connection
  • send an event - the consumer won't consume/process the event anymore until you restart it

Normally RedisListCheckerConsumer prints logs like this if it's working:

[11:01:52 VRB] Checking keys...
[11:01:52 VRB] Performing delay since no new items arrived

After the disconnect/reconnect RedisListCheckerConsumer doesn't log anything

producer:

    builder.Services.AddSlimMessageBus(mbb => {
        mbb.WithProviderRedis(settings =>
            settings.ConnectionString = "<connectionString>";
        mbb.AddServicesFromAssembly(Assembly.GetExecutingAssembly());

        mbb.Produce<TenantCreated>(producerBuilder => { producerBuilder.DefaultQueue("tenantCreated"); });

        mbb.AddJsonSerializer();
    });

consumer:

    builder.Services.AddSlimMessageBus(mbb => {
        mbb.WithProviderRedis(settings =>
            settings.ConnectionString = "<connectionString>";
        mbb.AddServicesFromAssembly(Assembly.GetExecutingAssembly());

        mbb.Consume<TenantCreated>(producerBuilder => { producerBuilder.Queue("tenantCreated");   });

        mbb.AddJsonSerializer();
    });

Version: 3.3.0

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions