Skip to content

Conversation

kjnilsson
Copy link
Contributor

This PR introduces a new queue type into RabbitMQ called "quorum queue". The amqqueue record has been augmented with a type field with two current values classic (which is the default, referring to the "normal" RabbitMQ queue implementation) or quorum to denote that the queue is a quorum queue.

Quorum queues use Raft to consistently replicate data across nodes and thus take a dependency on the Ra raft library. Ra provides an api where the "state machine" that runs inside Ra can be user provided by implementing a behaviour. The rabbit_fifo module implements the ra_machine behaviour to provide an AMQP-like queue running inside Ra. The rabbit_fifo_client module abstracts away interactions with the RA/rabbit_fifo system.

The current implementation includes significant changes to rabbit_channel to handle the new queue type. Currently it is implemented bearing only the two queue types in mind. If further queue types are added in the future this will probably need to change an a common rabbit_queue abstraction needs to be created to unify how client processes (currently channels) interact with queues of different types.

[#154472130]
Test queue.declare method with quorum type
Includes ra as a rabbit dependency

[#154472152]
Basic implementation. Might need an update when more functionality
is added to the quorum queues.

[#154472152]
[#154472158]
[#154472164]
Now supported by ra

[#154472158]
[#154472158]
no_ack = true is equivalent to autoack

[#154472211]
If we modify the data_dir, ra is not able to delete the data
when a queue is deleted

[#154472158]
Supports auto-ack

[#154472215]
dcorbacho and others added 20 commits October 12, 2018 13:12
To quorum-initial-group-size
Also avoid creating quorum queue session state on queue operation
methods.
Exit with protocol error of a basic.consume for a quorum queue is issued
on a channel with global qos enabled.
Strictly enfornce that channels do not monitor quorum queues.
To make it call classic and quorum queues the same way.

[#161314899]
during recovery as they should not be marked as stopped during failed
vhost recovery.
As the only user of this function, the management API no longer requires
it.
This change implements an alternative consumer credit mechanism similar
to AMQP 1.0 link credit where the credit (prefetch) isn't automatically
topped up as deliveries are settled and instead needs to be manually
increased using a credit command. This is to be integrated with the AMQP
1.0 plugin.

[#161256187]
Added support for AMQP 1.0 transfer flow control.

[#161256187]
So that if a vhost crashes and runs the recover steps it doesn't fail
because ra servers are still running.

[#161343651]
To ensure quorum queues are cleaned up on vhost removal.

Also fix xref issue.

[#161343673]
@kjnilsson kjnilsson changed the title DO NOT MERGE (YET): Quorum queue Quorum queue Oct 26, 2018
@kjnilsson kjnilsson changed the title Quorum queue Quorum queues Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants