Skip to content

EventBus: auto-reconnect RabbitMQ consumer #81

Description

@adedw

What to build

RabbitMQEventBus (CommentMap.EventBus, ported from eShop) does not restore the consumer after a RabbitMQ connection loss: the channel and subscriptions die until the process restarts. Implement persistent-connection behavior: handle ConnectionShutdownAsync / CallbackExceptionAsync, recreate the channel, re-declare topology and re-run BasicConsumeAsync for all DI subscriptions (see the eShopOnContainers DefaultRabbitMQPersistentConnection approach).

Acceptance criteria

  • Restarting the messaging RabbitMQ container mid-session does not permanently kill the consumer: email-sender reconnects, re-declares topology and re-subscribes automatically.
  • A confirmation email published during the outage window is processed after recovery (no process restart).
  • Reconnect uses bounded backoff, logs reconnect attempts, and does not spam unbounded exceptions.

Blocked by

None (can start immediately).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions