Skip to content

Single Active Consumer (SAC): consumer activity notifications via AMQP #14726

@ansd

Description

@ansd

Is your feature request related to a problem? Please describe.

Today, consumer activity status (active or inactive) is already displayed in the Management UI.

This issue is about AMQP consumers to learn about whether they are active or inactive when consuming from a quorum queue (QQ) with the single active consumer (SAC) feature enabled. Ideally, AMQP consumers are even proactively notified when they become active or inactive.

Describe the solution you'd like

The checkout reply already informs rabbit_fifo_client about the current activity status.
(The attach reply frame could optionally include the activity status.)
rabbit_fifo_client will hold this activity state for each consumer.
QQ optionally emits a new ra event when consumer activity changes. The consumer needs to opt-in in the #checkout{} ra cmd.

A new queue action consumer_activity will be introduced.
The session will proactively notify the client via a boolean active field in the flow frame properties.
RabbitMQ will also include this field in all flow reply frames for a QQ with SAC enabled.

Describe alternatives you've considered

Today AMQP clients have some workaround by sending a flow frame with drain=true or echo=true. RabbitMQ will reply with a flow frame containing Available = 0 if the consumer is inactive even if messages are ready in the queue. However, if the queue is empty this doesn't really tell whether the consumer is actually inactive.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions