Skip to content

Fix #13009, STOMP: default to exclusive queues except stream queues#13016

Merged
michaelklishin merged 6 commits intomainfrom
ik-stomp-exclusive-subs-13009
Mar 23, 2026
Merged

Fix #13009, STOMP: default to exclusive queues except stream queues#13016
michaelklishin merged 6 commits intomainfrom
ik-stomp-exclusive-subs-13009

Conversation

@ikavgo
Copy link
Copy Markdown
Contributor

@ikavgo ikavgo commented Jan 2, 2025

Proposed Changes

STOMP: default to exclusive queues except for quorum queues and streams.

Now that non-durable, non-exclusive queues are disabled by default, this
updates the STOMP plugin to use:

  • /queue/<name>: declares a durable, non-exclusive, non-auto-delete queue
  • /topic/<name> (default): declares a transient, exclusive, auto-delete queue bound to the topic exchange
  • /topic/<name> with durable:true and auto-delete:false: declares a durable, non-exclusive, non-auto-delete queue, allowing shared and resumable subscriptions
  • /exchange/<name>/<routing-key>: declares a transient, exclusive, auto-delete queue bound to the name exchange
  • /temp-queue/<name>: declares a transient, exclusive, auto-delete queue
  • /amq/queue/<name> and /reply-queue/<name>: nothing changes, these reference a pre-existing queue

This is a Breaking Change

For some STOMP destination types and clients that rely on all defaults, this is, at least technically, a breaking change.

However, so is the status quo: as of 4.3.0, non-durable, non-exclusive queues cannot be declared without opting out (a server reconfiguration), and that's exactly what the current STOMP plugin uses.

@michaelklishin
Copy link
Copy Markdown
Collaborator

At least some, if not all, remaining failures seem repeatable and related. Specifically main:main in the python_SUITE may be Ubuntu 24.04's Python-specific.

@michaelklishin michaelklishin force-pushed the ik-stomp-exclusive-subs-13009 branch from 26e0e9c to 8aa7d40 Compare March 23, 2026 17:00
@michaelklishin
Copy link
Copy Markdown
Collaborator

The forced push was a rebase on top of main.

The STOMP plugin still relies on `amqp_client` (for now),
which cannot use `rabbit_vhost`, so we extract a new
DQT resolution function that takes the virtual host
DQT as an argument.

The STOMP plugin then resolves the DQT using
`rabbit_vhost` and `rabbit_registry`, passes
it to `get_queue_type/2` and decides on the
properties based on the canonicalized type name
(a module name).
via `rabbit_vhost:default_queue_type/1`.
@deadtrickster
Copy link
Copy Markdown
Contributor

deadtrickster commented Mar 23, 2026

The common module looks strange. IMO rabbit_queue_type:default() looks better than rabbit_queue_type_common:default(). I.e. type module is already common and text just flows. So I wouldn't add that common module.

@michaelklishin
Copy link
Copy Markdown
Collaborator

@ikavgo take a look where does rabbit_routing_util is coming from: it's rabbit_common

@michaelklishin
Copy link
Copy Markdown
Collaborator

I have more changes in the works. However, I think we can move rabbit_routing_util to the STOMP plugin: I don't think any other protocol implementations still use it.

In that case we wouldn't need this common module.

This avoids making `amqp_client` aware of the DQT
code paths in the server, plus its Dialyzer run
now passes.
@michaelklishin michaelklishin merged commit 25cd730 into main Mar 23, 2026
184 checks passed
@michaelklishin michaelklishin deleted the ik-stomp-exclusive-subs-13009 branch March 23, 2026 19:39
mergify Bot pushed a commit that referenced this pull request Mar 23, 2026
This avoids making `amqp_client` aware of the DQT
code paths in the server, plus its Dialyzer run
now passes.

(cherry picked from commit b2d5376)
michaelklishin added a commit that referenced this pull request Mar 23, 2026
Fix #13009, STOMP: default to exclusive queues except stream queues (backport #13016)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants