Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 'queue.declare' aware of virtual host DQT at validation time #11541

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

michaelklishin
Copy link
Member

@michaelklishin michaelklishin commented Jun 24, 2024

DQT = default queue type.

Determining what queue type should be used is getting more and more involved.

It can come from four different places:

  1. The client (as an x-queue-type argument value) or the HTTP API
  2. Virtual host metadata
  3. Node-wide default from rabbitmq.conf
  4. If all else fails, the fallback ("classic")

In addition, there are two ways to specify a type:

  1. Clients use shortcuts such as "quorum"
  2. Definitions and many places internally use module names such as rabbit_classic_queue

When a client provides no queue type, validation
should take the defaults (virtual host, global,
and the last resort fallback) into account
instead of considering the type to be "undefined".

References #11457 ##11528.

@michaelklishin michaelklishin changed the title Make 'queue.declare' aware of virtual host DQT Make 'queue.declare' aware of virtual host DQT at validation time Jun 24, 2024
@michaelklishin michaelklishin force-pushed the mk-rabbit_queue-virtual-host-default-aware branch 3 times, most recently from 466f869 to 20decf6 Compare June 24, 2024 05:10
at validation time.

DQT = default queue type.

When a client provides no queue type, validation
should take the defaults (virtual host, global,
and the last resort fallback) into account
instead of considering the type to
be "undefined".

References #11457 ##11528
@michaelklishin michaelklishin force-pushed the mk-rabbit_queue-virtual-host-default-aware branch from 20decf6 to f3b7a34 Compare June 24, 2024 05:13
michaelklishin and others added 2 commits June 24, 2024 02:09
Besides fixing a regression detected by priority_queue_SUITE,
this introduces a drive-by change:

rabbit_priority_queue: avoid an exception when
max priority is a negative value that circumvented validation
@michaelklishin michaelklishin force-pushed the mk-rabbit_queue-virtual-host-default-aware branch from e677048 to 2e5cb21 Compare June 24, 2024 08:11
@michaelklishin michaelklishin merged commit 5de87aa into main Jun 24, 2024
253 checks passed
@michaelklishin michaelklishin deleted the mk-rabbit_queue-virtual-host-default-aware branch June 24, 2024 10:05
@michaelklishin
Copy link
Member Author

@Mergifyio backport v3.13.x

Copy link

mergify bot commented Jun 24, 2024

backport v3.13.x

✅ Backports have been created

michaelklishin added a commit that referenced this pull request Jun 24, 2024
…default-aware

Make 'queue.declare' aware of virtual host DQT at validation time

(cherry picked from commit 5de87aa)

 Conflicts:
	deps/rabbit/src/rabbit_queue_type.erl
	deps/rabbit/src/rabbit_vhost.erl
@michaelklishin
Copy link
Member Author

Backported to v3.13.x manually.

@michaelklishin michaelklishin added this to the 3.13.4 milestone Jun 24, 2024
michaelklishin added a commit that referenced this pull request Aug 24, 2024
when virtual host does not have any metadata.

References #11541 #11457 #11528
michaelklishin added a commit that referenced this pull request Aug 24, 2024
mergify bot pushed a commit that referenced this pull request Aug 24, 2024
when virtual host does not have any metadata.

References #11541 #11457 #11528

(cherry picked from commit 29051a8)
mergify bot pushed a commit that referenced this pull request Aug 24, 2024
References #11541 #11457 #11528

(cherry picked from commit c41c27d)
mergify bot pushed a commit that referenced this pull request Aug 24, 2024
when virtual host does not have any metadata.

References #11541 #11457 #11528

(cherry picked from commit 29051a8)
(cherry picked from commit f90a4e1)
mergify bot pushed a commit that referenced this pull request Aug 24, 2024
References #11541 #11457 #11528

(cherry picked from commit c41c27d)
(cherry picked from commit bd6097f)

# Conflicts:
#	deps/rabbitmq_amqp_client/test/management_SUITE.erl
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.

1 participant