Commit Graph

58811 Commits

Author SHA1 Message Date
Arnaud Cogoluègnes a67634fcf1
Merge pull request #13146 from rabbitmq/queue-purge-return-not-found-if-queue-does-not-exist
Return 404 in AMQP management queue purge for non-existing queue
2025-01-24 15:59:17 +00:00
Jean-Sébastien Pédron e883df4151
Merge pull request #13147 from rabbitmq/fix-test-flakes-in-amqp_client_SUITE
amqp_client_SUITE: Fix several test flakes
2025-01-24 16:35:28 +01:00
Jean-Sébastien Pédron aeca23c69d
amqp_client_SUITE: Fix several test flakes
[How]
1. Use feature flags correctly: the code shouldn't test if a feature
   flag is enabled, assuming something else enabled it. It should enable
   it and react to an error.
2. Use `close_connection_sync/1` instead of the asynchronous
   `amqp10_client:close_connection/1` to make sure they are really
   closed. The wait in `end_per_testcase/2` was not enough apparently.
3. For the two testcases that flake the most for me, enclose the code in
   a try/after and make sure to close the connection at the end,
   regardless of the result. This should be done for all testcases
   because the testgroup use a single set of RabbitMQ nodes for all
   testcases, therefore testcases are supposed to clean up after them...
2025-01-24 15:38:11 +01:00
Arnaud Cogoluègnes 7bfe2fd66f
Return 404 in AMQP management queue purge for non-existing queue 2025-01-24 14:57:44 +01:00
Michael Klishin 4627e7a360
Merge pull request #13138 from rabbitmq/simplify-direct-reply-to
Simplify Direct Reply-To
2025-01-24 07:31:41 -05:00
Michael Klishin c0bb5fb83f
Merge pull request #13140 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/org.springframework.boot-spring-boot-starter-parent-3.4.2
build(deps): bump org.springframework.boot:spring-boot-starter-parent from 3.4.1 to 3.4.2 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot
2025-01-23 14:12:02 -05:00
dependabot[bot] e0fff6a3d7
build(deps): bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.1...v3.4.2)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 19:03:32 +00:00
Michael Klishin cb7614584d
Merge pull request #13139 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/org.springframework.boot-spring-boot-starter-parent-3.4.2
build(deps): bump org.springframework.boot:spring-boot-starter-parent from 3.4.1 to 3.4.2 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2025-01-23 13:59:49 -05:00
dependabot[bot] 10cccba6f5
build(deps): bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.1...v3.4.2)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 18:58:59 +00:00
David Ansari 1267d5986d Simplify Direct Reply-To
This commit is no change in functionality and mostly deletes dead code.

1. Code targeting Erlang 22 and below is deleted since the mininmum
   required Erlang version is higher nowadays.
   "In OTP 23 distribution flag DFLAG_BIG_CREATION became mandatory. All
   pids are now encoded using NEW_PID_EXT, even external pids received
   as PID_EXT from older nodes."
   https://www.erlang.org/doc/apps/erts/erl_ext_dist.html#new_pid_ext
2. All v1 encoding and decoding of the Pid is deleted since the lower
   version RabbitMQ node supports the v2 encoding nowadays.
2025-01-23 19:16:30 +01:00
Michael Klishin 2291579c65
Merge pull request #13133 from rabbitmq/ignore-killed
Test helpers: add `** killed` to the default find crashes ignore list
2025-01-23 10:19:59 -05:00
Karl Nilsson d6865a648e Ct helpers: add "** killed" to the defaul log crash ignore list.
Exits the with reason "killed" only occurs "naturally" in OTP
when a supervisor tries to shut a child down and it times out.

It is used for failure simulation in tests quite frequently however.
2025-01-23 13:26:41 +00:00
Michael Klishin 289da1d16b
Merge pull request #13127 from rabbitmq/ra-v2.15.1
Ra 2.15.1
2025-01-22 16:56:49 -05:00
Karl Nilsson 2f89bd9122
Merge pull request #13095 from rabbitmq/qq-resend-pending-commands-on-applied
QQ: resend pending commands when new leader detected on applied notif…
2025-01-22 20:43:31 +01:00
Karl Nilsson 9ed8a3067c Ra 2.15.1
This version contains bug fixes and a change to use async_dist
when a quorum queue sends a message to a remote node (e.g. a consumer
delivery). Using async_dist will reduce chances of messages not
reaching consumers in a timely manner when the system is loaded
and occasionally fills the distribution buffer.
2025-01-22 14:31:13 +00:00
Karl Nilsson d31b9aa8a3 QQ: resend pending commands when new leader detected on applied notification.
When a leader changes all enqueuer and consumer processes are notified
from the `state_enter(leader,` callback. However a new leader may not
yet have applied all commands that the old leader had. If any of those
commands is a checkout or a register_enqueuer command these processes
will not be notified of the new leader and thus may never resend their
pending commands.

The new leader will however send an applied notification when it does
apply these entries and these are always sent from the leader process
so can also be used to trigger pending resends. This commit implements
that.
2025-01-22 13:38:21 +00:00
Michael Klishin d4dbb27c3a
Merge pull request #13121 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-22 07:24:34 -05:00
Michal Kuratczyk bc7335162f
Add more options to the discussion template 2025-01-22 12:34:51 +01:00
Michal Kuratczyk 446187c5b7
Add 4.0.5 to the disccusion template dropdown 2025-01-22 12:28:11 +01:00
David Ansari 3a65695d0a Support exchange federation with MQTT 5.0 subscribers
## What?
This commit fixes #13040.

Prior to this commit, exchange federation crashed if the MQTT topic exchange
(`amq.topic` by default) got federated and MQTT 5.0 clients subscribed on the
downstream. That's because the federation plugin sends bindings from downstream
to upstream via AMQP 0.9.1. However, binding arguments containing Erlang record
`mqtt_subscription_opts` (henceforth binding args v1) cannot be encoded in AMQP 0.9.1.

 ## Why?
Federating the MQTT topic exchange could be useful for warm standby use cases.

 ## How?
This commit makes binding arguments a valid AMQP 0.9.1 table (henceforth
binding args v2).

Binding args v2 can only be used if all nodes support it. Hence binding
args v2 comes with feature flag `rabbitmq_4.1.0`. Note that the AMQP
over WebSocket
[PR](https://github.com/rabbitmq/rabbitmq-server/pull/13071) already
introduces this same feature flag. Although the feature flag subsystem
supports plugins to define their own feature flags, and the MQTT plugin
defined its own feature flags in the past, reusing feature flag
`rabbitmq_4.1.0` is simpler.

This commit also avoids database migrations for both Mnesia and Khepri
if feature flag `rabbitmq_4.1.0` gets enabled. Instead, it's simpler to
migrate binding args v1 to binding args v2 at MQTT connection establishment
time if the feature flag is enabled. (If the feature flag is disabled at
connection etablishment time, but gets enabled during the connection
lifetime, the connection keeps using bindings args v1.)

This commit adds two new suites:
1. `federation_SUITE` which tests that federating the MQTT topic
   exchange works, and
2. `feature_flag_SUITE` which tests the binding args migration from v1 to v2.
2025-01-22 11:04:36 +01:00
Arnaud Cogoluègnes a51d8a5ec9
Merge pull request #13119 from rabbitmq/stream-test-utils-fix-wait-for-confirms
Fix wait-for-confirms sequence in stream test utils
2025-01-22 08:49:37 +00:00
GitHub a3d0a5af4f bazel run gazelle 2025-01-22 04:02:32 +00:00
Arnaud Cogoluègnes b3b0940024
Fix wait-for-confirms sequence in stream test utils
And refine the implementation and its usage.
2025-01-21 17:38:58 +01:00
Michael Klishin c5edd60c66
Merge pull request #13105 from rabbitmq/stream-consume-cancel-emit-events
Emit internal events on stream consume and cancel
2025-01-21 08:57:12 -05:00
Michael Klishin 5078a7495a
Merge pull request #13111 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.assertj-assertj-core-3.27.3
build(deps-dev): bump org.assertj:assertj-core from 3.27.2 to 3.27.3 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2025-01-20 15:07:52 -05:00
dependabot[bot] e8bfd142d3
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.2 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.2...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 18:50:11 +00:00
Michael Klishin 167cecfa24
Merge pull request #13110 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.assertj-assertj-core-3.27.3
build(deps-dev): bump org.assertj:assertj-core from 3.27.2 to 3.27.3 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-01-20 13:40:47 -05:00
dependabot[bot] 8aac1afb45
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.2 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.2...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 18:31:09 +00:00
Michael Klishin 8e06704272
Merge pull request #13109 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.assertj-assertj-core-3.27.3
build(deps-dev): bump org.assertj:assertj-core from 3.27.2 to 3.27.3 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2025-01-20 13:29:42 -05:00
dependabot[bot] 86a818dc86
build(deps-dev): bump org.assertj:assertj-core
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.2 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.2...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 18:23:05 +00:00
Arnaud Cogoluègnes 31a4d611f1
Emit events on stream consume and cancel 2025-01-20 17:24:55 +01:00
Michal Kuratczyk a8c8cf2fd9
Run oci-arm64 on ARM runners 2025-01-17 16:50:30 +01:00
Arnaud Cogoluègnes 1886caec0a
Merge pull request #13092 from rabbitmq/stream-consumer-cancel-event
Emit cancellation event only when stream consumer is cancelled
2025-01-17 14:13:08 +00:00
Arnaud Cogoluègnes 69d0382dd2
Emit cancellation event only when stream consumer is cancelled
Not when the channel or the connection is closed.

References #13085, #9356
2025-01-17 14:42:40 +01:00
David Ansari 99782120f7 Highlight busy incoming links
Visualise busy links from publisher to RabbitMQ. If the link credit
reaches 0, we set a yellow background colour in the cell.
Note that these credit values can change many times per second while the
management UI refreshes only every few seconds. However, it may still
give a user an idea of what links are currently busy.

We use yellow since that's consistent with the `flow` state in AMQP
0.9.1, which is also set to yellow.

We do not want want to highlight **outgoing** links with credit 0 as
that might be a paused consumer, and therefore not a busy link.

We also use yellow background color if incoming-window is 0 (in case of
a cluster wider memory or disk alarm) or if remote-incoming-window is 0
as consumers should try to keep their incoming-window open and instead
use link credit if they want to pause consumption.

Additionaly we set a grey background colour for the `/management`
address just to highlight them slightly since these are "special" link
pairs.
2025-01-17 14:40:43 +01:00
Michal Kuratczyk 3ff90deb7c
Merge pull request #13069 from rabbitmq/update-startup-checks
Remove deprecated/unused/old startup checks
2025-01-17 14:28:50 +01:00
Michal Kuratczyk 14171fb035
Remove msg_store_io_batch_size and msg_store_credit_disc_bound checks
msg_store_io_batch_size is no longer used

msg_store_credit_disc_bound appears to be used in the code, but I don't
see any impact of that value on the performance. It should be properly
investigated and either removed completely or fixed, because there's
hardly any point in warning about the values configured
(plus, this settings is hopefully almost never used anyway)
2025-01-17 13:38:43 +01:00
Michael Klishin a8d848f944
Merge pull request #13090 from rabbitmq/mk-format-empty-consumer-channel-details-as-empty-map
HTTP API: format empty consumer.channel_details as an empty object
2025-01-16 20:56:55 -05:00
Michael Klishin 4edb9019c3
HTTP API: format empty consumer.channel_details as an empty object
and not an empty JSON array.

We have previously addressed this class of issues in other
places.
2025-01-16 20:41:23 -05:00
Michael Klishin 8d07657898
Merge pull request #13087 from cloudamqp/prio_queue_delete_crashed
Fix return value of `rabbit_priority_queue:delete_crashed/1`
2025-01-16 12:33:27 -05:00
Michal Kuratczyk 954b861db7
Don't warn about dirty I/O scheduler count 2025-01-16 17:42:13 +01:00
Péter Gömöri efd4e45ed8 Fix return value of `rabbit_priority_queue:delete_crashed/1`
According to the `rabbit_backing_queue` behavious it must always
return `ok`, but it used to return a list of results one for each
priority. That caused the below crash further up the call chain.

```
> rabbit_classic_queue:delete_crashed(Q)
** exception error: no case clause matching [ok,ok,ok,ok,ok,ok,ok,ok,ok,ok,ok]
     in function  rabbit_classic_queue:delete_crashed/2 (rabbit_classic_queue.erl, line 516)
```

Other backing_queue implementations (`rabbit_variable_queue`) just
exit with a badmatch upon error.

This (very minor) issue is present since 3.13.0 when
`rabbit_classic_queue:delete_crashed_in_backing_queue/1` was
instroduced with Khepri in commit 5f0981c5. Before that the result of
`BQ:delete_crashed/1` was simply ignored.
2025-01-16 17:34:19 +01:00
Arnaud Cogoluègnes 114a5c220f
Delete stream consumer metrics when AMQP 091 connection closes (#13085)
To avoid rogue consumer records.
2025-01-16 15:40:06 +01:00
Karl Nilsson 5ada42e42d
Merge pull request #13083 from rabbitmq/qq-improve-resend-log-msg
QQ: improve fifo client log message on leader change
2025-01-16 12:53:25 +01:00
Karl Nilsson e7c624dd46 QQ: improve fifo client log message on leader change
to capture the number of pending commands that will be resent
2025-01-16 09:36:23 +00:00
David Ansari 290889b936 Include sessions in format_status/1
Include monitored session pids in format_status/1 of rabbit_amqp_writer.
They could be useful when debugging.
The maximum number of sessions per connection is limited, hence the
output won't be too large.
2025-01-16 10:06:24 +01:00
Michael Klishin 84eda1219e
Merge pull request #13080 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/com.diffplug.spotless-spotless-maven-plugin-2.44.2
build(deps): bump com.diffplug.spotless:spotless-maven-plugin from 2.44.1 to 2.44.2 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2025-01-15 23:45:30 -05:00
Michael Klishin 9649e2f232
Merge pull request #13079 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/com.diffplug.spotless-spotless-maven-plugin-2.44.2
build(deps): bump com.diffplug.spotless:spotless-maven-plugin from 2.44.1 to 2.44.2 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-01-15 23:45:21 -05:00
Michael Klishin e9c1df9630
Merge pull request #13078 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/com.diffplug.spotless-spotless-maven-plugin-2.44.2
build(deps): bump com.diffplug.spotless:spotless-maven-plugin from 2.44.1 to 2.44.2 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2025-01-15 23:45:13 -05:00
Jean-Sébastien Pédron 5bc7803f5d
Merge pull request #13077 from rabbitmq/fix-how-RABBITMQ_FEATURE_FLAGS-is-set-in-tests
rabbitmq_ct_helpers: Fix how we set `$RABBITMQ_FEATURE_FLAGS` in tests
2025-01-15 23:32:05 +01:00