Skip to content

Feature: AMQP event bus - buffer events while the broker is unreachable #14676

Open

Description

@durdin85

The required feature described as a wish

I would like the RabbitMQ event bus to keep events that are published while the broker is unreachable and deliver them, in order, once the connection is back, within configurable limits (number of events and maximum
age).

As we tested during the network outage, every event that is published while the broker is unreachable is lost.

At the moment it works like that events are sent with without publisher confirms, so when the connection is down, the event is discarded.
The reconnect logic restores the connection only and nothing is replayed:

  • when publish() catches AlreadyClosedException it calls closeConnection().
    That shutdown is application initiated, so DisconnectHandler ignores it and no
    ReconnectionTask is started. The next publish() then connects on the calling thread, which can block for up to the client's connection timeout if the host does not answer.

Another observation - the RabbitMQ client reports any connection close it did not initiate as "shutdown by AMQP server", including closes by a load balancer idle timeout.

Also it seems, the current code has no confirmation mechanism, so we never know the messages really reached the AMQP.

Proposal

  • Keep events that cannot be sent in a bounded in-memory FIFO buffer and send
    them in order after the reconnect.
  • Two optional properties on the existing event bus bean: maximum number of
    buffered events (default 1000, oldest dropped first) and maximum age of a
    buffered event (default 5 minutes).
  • Buffer only after the broker was reachable at least once; before that keep
    today's behavior.

Activity

  1. added a commit that references this issue on Nov 11, 2026
    e55b4a4
  2. github-actions commented on Nov 12, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    The request is for the RabbitMQ event bus to buffer events published while the broker is unreachable, in a bounded in-memory FIFO (default 1000 events, 5 minute maximum age), and to send them in order after reconnect. The reporter says events are currently dropped, because publishing is not confirmed and publish() closes the connection without starting the reconnect task. A pull request (#14677) implementing a buffer is already open.

    📊 Assessment

    Dimension Value Reasoning
    Type type:new-feature Requests new buffering behaviour; no crash reported
    Component none The issue text does not map to a component label
    Severity n/a Not a bug report
    Labels type:new-feature Based only on the issue text
    Coding agent Not suitable Buffer semantics (ordering, drop policy, startup behaviour) need maintainer review; PR #14677 is already open

    🔗 Similar issues

    💡 Notes and suggestions

    Triage by Copilot (automated)

    Generated by Daily Issue Triage · copilot · haiku55 · ~4 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions