Commit Graph

31418 Commits

Author SHA1 Message Date
Loïc Hoguin e50bf704f1
Web-STOMP: Add a test for HTTP/2 Websocket 2025-09-24 14:29:49 +02:00
Loïc Hoguin 3bad41f4f2
Web-MQTT: Add a test for HTTP/2 Websocket 2025-09-24 14:00:12 +02:00
Loïc Hoguin 725c2d560f
Enable HTTP/2 Websocket in Web plugins
This uses Cowboy's new direct data delivery mechanism,
which provides more performance.

Cowboy is now pinned to 2.14.0 and Cowlib to 2.16.0.

HTTP/2 Websocket is enabled by default. It can be disabled
as needed by setting `#{enable_connect_protocol => false}`
in the plugin's `cowboy_opts`.

Web-STOMP did not have HTTP/2 enabled before, now it does.
Web-MQTT already had HTTP/2 enabled.
2025-09-19 11:27:57 +02:00
Loïc Hoguin ecc77ecc27
Make Web-STOMP example use wss:// when in https:// 2025-09-18 14:11:21 +02:00
Luke Bakken db1291d49b
Code to clean up queue process state when crashed
* Call `Mod:format_state/1` if exported to possibly truncate huge states
* Add more information about truncated ram_pending_ack and disk_pending_ack
* Add `log.error_logger_format_depth` cuttlefish schema value
* Add `format_state/1` to `rabbit_channel`
* Add `log.summarize_process_state`, default is `false`, to enable summarizing process state for crash logs.
* Added `format_state` to `rabbit_classic_queue_index_v2` and `rabbit_classic_queue_store_v2`
* Ensure `rabbit_channel:format_state/1` uses `summarize_process_state_when_logged`
* Do not set `summarize_process_state_when_logged` value by default.
* Type specs
2025-09-15 09:37:12 -07:00
Arnaud Cogoluègnes e0bbd50322
Merge pull request #14536 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-047390c407
[skip ci] Bump the dev-deps group across 2 directories with 3 updates
2025-09-15 06:00:20 +00:00
dependabot[bot] 29c084f0c9
[skip ci] Bump the prod-deps group across 5 directories with 3 updates
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).


Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.10 to 2.2.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.10...v2.2.20)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.10 to 2.2.20

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 18:11:55 +00:00
dependabot[bot] a93c552a7e
[skip ci] Bump the dev-deps group across 2 directories with 3 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.google.code.gson:gson](https://github.com/google/gson).


Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.10 to 2.2.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.10...v2.2.20)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.10 to 2.2.20

Updates `com.google.code.gson:gson` from 2.13.1 to 2.13.2
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.13.1...gson-parent-2.13.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 18:07:41 +00:00
David Ansari d29cac3cd5 Optimise Khepri for concurrent reads
This commit makes read operations for the following Khepri projections much cheaper:
* rabbit_khepri_queue
* rabbit_khepri_exchange
* rabbit_khepri_index_route
* rabbit_khepri_topic_trie

Entries in these ETS tables are read for every message entering RabbitMQ.
Some messages entering RabbitMQ will cause even multiple reads from
these ETS tables, e.g. multiple reads from `rabbit_khepri_queue` if a message
is routed to more than one queue or multiple reads from `rabbit_khepri_index_route`
if a message has multiple routing keys.

On a busy RabbitMQ node, these tables are read concurrently (on multiple physical processors)
hundreds of thousands of times per second.
2025-09-12 15:48:52 +02:00
David Ansari 0843704dbb Disallow multiple consumers on one volatile queue
There can be at most one consumer per volatile queue instance.
This consumer must also have attached on the same channel/session as the
creator of the queue.

Prior to this commit, it was possible for clients on other
connections or sessions to attach a receiving link to an existing volatile
queue name, even though no messages would be delivered.

It's better for RabbitMQ to directly refuse the link at attach time.
2025-09-12 12:06:51 +02:00
David Ansari 72cd7a35c2 Support Direct Reply-To for AMQP 1.0
# What?
* Support Direct Reply-To for AMQP 1.0
* Compared to AMQP 0.9.1, this PR allows for multiple volatile queues on a single
  AMQP 1.0 session. Use case: JMS clients can create multiple temporary queues on
  the same JMS/AMQP session:
  * https://jakarta.ee/specifications/messaging/3.1/apidocs/jakarta.messaging/jakarta/jms/session#createTemporaryQueue()
  * https://jakarta.ee/specifications/messaging/3.1/apidocs/jakarta.messaging/jakarta/jms/jmscontext#createTemporaryQueue()
* Fix missing metrics in for Direct Reply-To in AMQP 0.9.1, e.g.
  `messages_delivered_total`
* Fix missing metrics (even without using Direct Reply-To ) in AMQP 0.9.1:
  If stats level is not `fine`, global metrics `rabbitmq_global_messages_delivered_*` should still be incremented.

 # Why?
* Allow for scalable at-most-once RPC reply delivery
  Example use case: thousands of requesters connect, send a single
  request, wait for a single reply, and disconnect.
  This PR won't create any queue and won't write to the metadata store.
  Therefore, there's less pressure on the metadata store, less pressure
  on the Management API when listing all queues, less pressure on the
  metrics subsystem, etc.
* Feature parity with AMQP 0.9.1

 # How?
This PR extracts the previously channel specific Direct Reply-To code
into a new queue type: `rabbit_volatile_queue`.
"Volatile" describes the semantics, not a use-case. It signals non-durable,
zero-buffer, at-most-once, may-drop, and "not stored in Khepri."

This new queue type is then used for AMQP 1.0 and AMQP 0.9.1.

Sending to the volatile queue is stateless like previously with Direct Reply-To in AMQP 0.9.1 and like done
for the MQTT QoS 0 queue.
This allows for use cases where a single responder replies to e.g. 100k different requesters.

RabbitMQ will automatically auto grant new link-credit to the responder because the new queue type confirms immediately.

The key gets implicitly checked by the channel/session:
If the queue name (including the key) doesn’t exist, the `handle_event` callback for this queue isn’t invoked and therefore
no delivery will be sent to the responder.

This commit supports Direct Reply-To across AMQP 1.0 and 0.9.1. In other
words, the requester can be an AMQP 1.0 client while the responder is an
AMQP 0.9.1 client or vice versa.
RabbitMQ will internally convert between AMQP 0.9.1 `reply_to` and AMQP
1.0 `/queues/<queue>` address. The AMQP 0.9.1 `reply_to` property is
expected to contain a queue name. That's in line with the AMQP 0.9.1
spec:
> One of the standard message properties is Reply-To, which is designed
specifically for carrying the name of reply queues.

Compared to AMQP 0.9.1 where the requester sets the `reply_to` property
to `amq.rabbitmq.reply-to` and RabbitMQ modifies this field when
forwarding the message to the request queue, in AMQP 1.0 the requester
learns about the queue name from the broker at link attachment time.
The requester has to set the reply-to property to the server generated
queue name. That's because the server isn't allowed to modify the bare
message.

During link attachment time, the client has to set certain fields.
These fields are expected to be set by the RabbitMQ client libraries.
Here is an Erlang example:
```erl
Source = #{address => undefined,
           durable => none,
           expiry_policy => <<"link-detach">>,
           dynamic => true,
           capabilities => [<<"rabbitmq:volatile-queue">>]},
AttachArgs = #{name => <<"receiver">>,
               role => {receiver, Source, self()},
               snd_settle_mode => settled,
               rcv_settle_mode => first},
{ok, Receiver} = amqp10_client:attach_link(Session, AttachArgs),
AddressReplyQ = receive {amqp10_event, {link, Receiver, {attached, Attach}}} ->
                  #'v1_0.attach'{source = #'v1_0.source'{address = {utf8, Addr}}} = Attach,
                  Addr
end,
```

The client then sends the message by setting the reply-to address as
follows:
```erl
amqp10_client:send_msg(
  SenderRequester,
  amqp10_msg:set_properties(
    #{message_id => <<"my ID">>,
      reply_to => AddressReplyQ},
    amqp10_msg:new(<<"tag">>, <<"request">>))),
```

If the responder attaches to the queue target in the reply-to field,
RabbitMQ will check if the requester link is still attached. If the
requester detached, the link will be refused.

The responder can also attach to the anonymous null target and set the
`to` field to the `reply-to` address.

If RabbitMQ cannot deliver a reply, instead of buffering the reply,
RabbitMQ will be drop the reply and increment the following Prometheus metric:
```
rabbitmq_global_messages_dead_lettered_maxlen_total{queue_type="rabbit_volatile_queue",dead_letter_strategy="disabled"} 0.0
```
That's in line with the MQTT QoS 0 queue type.

A reply message could be dropped for a variety of reasons:
1. The requester ran out of link-credit. It's therefore the requester's
   responsibility to grant sufficient link-credit on its receiving link.
2. RabbitMQ isn't allowed to deliver any message to due session flow
   control. It's the requster's responsibility to keep the session window
   large enough.
3. The requester doesn't consume messages fast enough causing TCP
   backpressure being applied or the RabbitMQ AMQP writer proc isn't
   scheduled quickly enough. The latter can happen for example if
   RabbitMQ runs with a single scheduler (is assigned a single CPU
   core). In either case, RabbitMQ internal flow control causes the
   volatile queue to drop messages.

Therefore, if high throughput is required while message loss is undesirable, a classic queue should be used
instead of a volatile queue since the former buffers messages while the
latter doesn't.

The main difference between the volatile queue and the MQTT QoS 0 queue
is that the former isn't written to the metadata store.

 # Breaking Change
Prior to this PR the following [documented caveat](https://www.rabbitmq.com/docs/4.0/direct-reply-to#limitations) applied:
> If the RPC server publishes with the mandatory flag set then `amq.rabbitmq.reply-to.*`
is treated as **not** a queue; i.e. if the server only publishes to this name then the message
will be considered "not routed"; a `basic.return` will be sent if the mandatory flag was set.

This PR removes this caveat.
This PR introduces the following new behaviour:
> If the RPC server publishes with the mandatory flag set, then `amq.rabbitmq.reply-to.*`
is treated as a queue (assuming this queue name is encoded correctly). However,
whether the requester is still there to consume the reply is not checked at routing time.
In other words, if the RPC server only publishes to this name, then the message will be
considered "routed" and RabbitMQ will therefore not send a `basic.return`.
2025-09-09 14:52:22 +02:00
Michael Klishin 81117133be
auth_oauth2.https.peer_verification was replaced with auth_oauth2.https.verify for consistency with other equivalent keys 2025-09-06 13:52:17 -04:00
Michael Klishin b83433cc06
OAuth 2 plugin: typos, minor edits of rabbitmq.conf schema 2025-09-06 13:50:46 -04:00
Michael Klishin fa954e0a53
rabbitmq.conf.example: add most commonly used OAuth 2-related keys 2025-09-06 13:47:34 -04:00
Michael Klishin 3bcc96f045
rabbitmq.conf.example: mention a new doc guide, https://www.rabbitmq.com/docs/stream-connections 2025-09-05 18:55:15 -04:00
Luke Bakken 3280bed8ac
Additional JSON CLI formatter fix (#14511)
A list of binaries was incorrectly converted by
`unicode:characters_to_binary` into one big binary. Add a function head
to match this case.

Also, add tests for the values that were not correctly formatted prior
to #14101 and #14381
2025-09-05 12:29:29 -07:00
David Ansari 41337bbb1d
Merge pull request #14507 from rabbitmq/fix-direct-reply-to-regression
Speed up Direct Reply-To
2025-09-05 09:58:05 +02:00
Michael Klishin b64d98edce
Edit, expand, reformat rabbitmq.conf.example 2025-09-04 23:31:31 -04:00
David Ansari 9f2ff6c150 Speed up Direct Reply-To
Speed up Direct Reply-To in AMQP 0.9.1 because prior to this PR sending each RPC reply
was bottlenecked by the slowest network link between the RabbitMQ node the responder
connected to and all other RabbitMQ nodes. This regression was introduced in RabbitMQ 3.12.0
via d65637190a
2025-09-04 18:27:52 +02:00
Arnaud Cogoluègnes 67ac485e74
Use base64 encoding for random binary in test
The random binary contains characters that can make an authentication
test fail. Encoding it in base64 fixes the problem.
2025-09-04 09:35:12 +00:00
Michael Klishin bd7450342e
Merge pull request #14458 from rabbitmq/qq-policy-repair-fix
QQ: exclude delivery_limit from policy repair comparison.
2025-09-03 11:07:48 -04:00
Michael Klishin 0f6b1dbae0
Merge pull request #14493 from rabbitmq/md/fifo-overview-smallest-index-detail
rabbit_fifo: Expose each smallest raft index in `overview/1`
2025-09-03 11:03:07 -04:00
Loïc Hoguin 862368471e
make: Remove the parallel-ct target
The parallel-ct-set* targets are enough for both CI and local
usage, so it's better to avoid duplicating things.
2025-09-03 11:50:52 +02:00
David Ansari 96d31ecb3c Use Khepri by default in CT tests
When starting a new cluster, Khepri is the default metadata store in 4.2.
Let's also make Khepri the default metadata store in CT tests.
2025-09-03 10:23:51 +02:00
Michael Davis 7f36b015ea
rabbit_fifo: Expose each smallest raft index in `overview/1`
This is meant to be used as a debugging tool via an eval command. It can
be hard to tell from the outside why a QQ is not snapshotting. Looking
at the `overview/1` is a nice debugging tool. The `smallest_raft_index`
key (and other keys like the `release_cursors`) points out why a
snapshot isn't being taken. The `smallest_raft_index` is the minimum of
three criteria though:

* oldest ready message
* oldest checked out message
* oldest message in the dlx state

This change adds all of those indexes so that it is clear which criteria
is keeping the `smallest_raft_index` down.
2025-09-02 14:23:55 -04:00
Michael Klishin 522d8fd4d8
Merge pull request #14488 from rabbitmq/local-shovels-confirm-on-autodelete
Local shovels: send confirms and rejections before autodelete
2025-09-02 12:00:23 -04:00
Diana Parra Corbacho 0eb5046094 Local shovels: send confirms and rejections before autodelete 2025-09-02 16:49:09 +02:00
David Ansari 917035e50d Delete amqp_filtex_SUITE from ct.test.spec
This test suite doesn't exist anymore.
2025-09-02 16:39:52 +02:00
Diana Parra Corbacho 41d52835bf Local shovels: fix handling of acks/nacks from multiple queues 2025-09-02 12:09:58 +02:00
Diana Parra Corbacho 8a116500e0 Local shovels: generate multiple ack/nack as the channel does
Avoids overflowing source queue with individual ack/nacks
2025-09-02 12:09:17 +02:00
Diana Parra Corbacho 6e2e19591a Local shovels: fix handling of acks/nacks 2025-09-02 12:09:17 +02:00
D Corbacho 7f1febe70b
Local shovels: exclude tests in mixed-versions with 3.13.x (#14482)
The test suites need to be excluded at group level, so the end_per_suite
is always executed and the cluster stopped. Otherwise, clusters
remain running in CI and the following suites find the TCP ports busy.
2025-09-02 10:56:56 +02:00
David Ansari 8cfcd7972b
Merge pull request #14477 from rabbitmq/bump-emqtt
Bump emqtt to v1.14.6
2025-09-02 10:03:49 +02:00
David Ansari bb7ead235e Fix test case block_connack_timeout
The new client library version returns reason
`{shutdown, connack_timeout}` in the monitor message.

Delete the monitor since the test case already asserts on the
`{error, connack_timeout}` return value from emqtt:connect/1.
2025-09-02 08:36:06 +02:00
David Ansari bfa8f72033 Bump emqtt to v1.14.6 2025-09-02 08:36:06 +02:00
Michael Klishin 323ce94fd8
rabbitmq_shovel_prometheus: handle single atom shovel states
Namely, 'starting'.

Previously, a Prometheus scraping endpoint hit
just at the right moment (when a shovel was
in the 'starting' state) would produce
a function_clause exception.
2025-09-02 01:55:23 -04:00
Michael Klishin fa98e459fc
rabbitmq.conf.example: cosmetics 2025-09-01 12:26:25 -04:00
Michal Kuratczyk 1b4cff21b3
Skip local shovel tests when mixed with 3.13 (#14475) 2025-09-01 15:50:44 +02:00
David Ansari def157a105
Merge pull request #14438 from rabbitmq/stream-queue-leader-fix
Fix issue where leader is not returned after stream declaration
2025-09-01 15:32:22 +02:00
D Corbacho 0977ad2dde
Local shovels: skip tests in mixed-version (#14473)
Local shovels require rabbitmq_4_0_0 feature flag, so it can't run
in mixed-version clusters with 3.13.x
2025-09-01 13:25:51 +02:00
dependabot[bot] 225e3617d9
[skip ci] Bump org.apache.qpid:qpid-jms-client
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: org.apache.qpid:qpid-jms-client.


Updates `org.apache.qpid:qpid-jms-client` from 2.7.0 to 2.8.0

---
updated-dependencies:
- dependency-name: org.apache.qpid:qpid-jms-client
  dependency-version: 2.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-30 18:02:44 +00:00
Michael Klishin 30fb9c1128
Re-arrange shovel test suites
* Use more descriptive names
 * Prefix unit test suites accordingly
 * Reuse await_credit/1
 * await_credit/1 in a flakey test
2025-08-29 18:34:51 -04:00
Karl Nilsson 4d7a3fed1e QQ: exclude delivery_limit from policy repair comparison.
As it cannot be updated as part of a policy when it is disabled (-1)
 it needs to be excluded from comparison
2025-08-29 09:49:07 +01:00
Michael Davis 9414209d67
rabbit_ff_controller: Raise log levels of first-time boot messages
These lines can be very useful for determining why a subset of feature
flags is/isn't being enabled on boot. They're currently at debug level.
However a first-time boot of an unclustered node is a rare event, so
these lines shouldn't be noisy.
2025-08-28 20:03:37 -04:00
Michael Klishin 9d7ee9639f
Merge pull request #14448 from rabbitmq/test-feature-flags-in-management-ui-in-main
New Selenium suite for testing feature flags in management UI
2025-08-28 10:24:44 -04:00
Péter Gömöri bfa38d00b0 Fix docs: list_unresponsive_queues queue-timeout is in seconds
The unit was changed in commit 829a918c
2025-08-28 14:06:05 +02:00
Marcial Rosales a809c3000e Test feature flags in management ui with selenium 2025-08-28 11:02:06 +02:00
Michael Klishin 88ea37b290
Shovel: use a constant for the runtime parameter component 2025-08-27 17:26:07 -04:00
Karl Nilsson e5891e24de Fix issue where leader is not returned after stream declaration
This would affect the meta data that is returned when declaring
a queue through AMQP.
2025-08-27 14:40:08 +01:00
David Ansari eef470df37 Detach link for link-level errors
## What?
Refuse or detach the link instead of ending the session for many
link-level errors, including the following:
* Source queue or target exchange doesn't exist during attach
* Trying to consume from an exclusive queue on a different connection
* Delivery of message to a target queue fails
* Wrong delivery-id
* Wrong settled flag
* Queue declaration fails for dynamic queues
* Publishing to internal exchange

 ## Why?
Because many errors are scoped to a single terminus, detaching just that link
preserves the rest of the session’s links - avoiding needless disruption of
other traffic. AMQP 1.0’s error model is hierarchical; RabbitMQ should escalate to
ending the session only for session-level faults or if the client keeps
using a destroyed link.

 ## How?
Refuse link as per figure 2.33
2025-08-27 09:49:22 +02:00