Commit Graph

60279 Commits

Author SHA1 Message Date
Michael Klishin b7d6bf9bd4
Merge pull request #14931 from amazon-mq/lukebakken/rabbitmq-server-14923
HTTP API: when virtual host is known, limit permission filtering to just that specific virtual host
2025-11-12 15:57:09 -08:00
Michael Klishin 25e31b5fc8
Merge pull request #14894 from rabbitmq/md/read-ahead-limit-merge
Merge `stream.read_ahead` and `stream.read_ahead_limit` options
2025-11-12 12:37:31 -08:00
Luke Bakken e8d9218325 When vhost is known, limit auth to that vhost
This reduces the number of extraneous auth queries to vhosts that aren't
relevant.

These changes also provide friendlier formatting in
`log_access_control_result`

Fixes #14923
2025-11-12 10:56:54 -08:00
Michael Davis 76ce4ee425
Merge `stream.read_ahead` and `stream.read_ahead_limit` options
Read-ahead can be controlled by a single option, with zero acting the
same as `false`.
2025-11-12 13:36:50 -05:00
Michael Klishin f322fb87ed
Dependabot: drop Selenium dependency updates in v4.0.x
That branch is so far behind it needs a comprehensive
Selenium suite dependency bump.
2025-11-12 10:29:43 -08:00
Jean-Sébastien Pédron 7540b4b78a
Merge pull request #14942 from rabbitmq/reset-feature-flags-registry-after-copy
rabbit_feature_flags: Reset registry after copying feature states
2025-11-12 14:56:45 +01:00
Jean-Sébastien Pédron 932a971853
rabbit_feature_flags: Reset registry after copying feature states
[Why]
The copy is likely to install a different list of enabled feature flags
compared to the possibly loaded registry. Therefore it needs to be
reset.

[How]
This is already the case, but the reset is done from the clustering
code and not right after the copy, leaving a time frame where the
feature states are inconsistent between the loaded registry and the
on-disk record.

This should be the responsibility of the Feature flags subsystem anyway.
2025-11-12 11:52:45 +01:00
Michael Klishin d6bad8237d
Merge pull request #14937 from amazon-mq/lukebakken/ssl-defaults
Always set and fix up TLS options in LDAP plugin
2025-11-11 14:31:00 -08:00
Michael Klishin 1b56c4c1bd
Merge pull request #14915 from rabbitmq/mk-exclude-relative-paths-from-hex-pm-packages
Build system: fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm
2025-11-11 13:37:23 -08:00
Michael Klishin 6dc214e3d1
Merge pull request #14926 from rabbitmq/qq-drop-head-order
Fix quorum queue `drop-head` dead letter order
2025-11-11 13:31:36 -08:00
Luke Bakken 0f3e5b4a5a
Always set and fix up SSL options in LDAP plugin
There's an edge case in LDAP SSL configuration. If you set...

```
auth_ldap.use_ssl = true
```

...but nothing else, you'll eventually hit this error:

```
{error, {options, incompatible,
    [{verify, verify_peer}, {cacerts, undefined}]}}
```

This is due to the fact that without any SSL options, the
`rabbit_ssl_options:fix_client/1` function won't be hit, and thus system
certs won't be added via `public_key:cacerts_get/0` and `cacerts`
option.

This PR adds `verify, verify_peer` as the default SSL option and ensures
that `rabbit_ssl_options:fix_client/1` is always called. Since
`verify_peer` is the default since OTP 26, we can just add it here.
2025-11-11 10:15:45 -08:00
David Ansari 59fdd73d14 Add release notes 2025-11-11 09:52:52 +01:00
David Ansari 42d208d30b Simplify 2025-11-11 09:37:40 +01:00
Michael Klishin 1262b01377
Merge pull request #14929 from rabbitmq/mk-extra-shovel-tests
Shovels: introduce `rabbit_shovel_parameters:{src,dest}_protocol/1`
2025-11-10 14:32:59 -08:00
Michael Klishin c8cb9dda6e
Introduce rabbit_shovel_parameters:{src,dest}_protocol/1
which can be used to implement an existing function,
`protocols/1`.
2025-11-10 12:45:34 -08:00
Michael Klishin 4ce144542d
Shovels: cover local shovels in unit_parsing_and_validation_SUITE 2025-11-10 12:08:46 -08:00
Michael Klishin 4308d4be0c
Merge pull request #14917 from amazon-mq/lukebakken/oauth2_client-cacerts
Fix up `oauth2_client` ssl options
2025-11-10 10:06:20 -08:00
David Ansari 422cc2e715 Drop large number of messages more efficiently
This commit at-most-once dead letters a huge number of quorum queue
messages due to overflow behaviour `drop-head` more efficiently
by avoiding repeatedly creating huge lists.

A huge number of messages gets dropped if for example:
* when the `max-length(-bytes)' is changed via a policy update, or
* a very large message was just enqueued causing many small messages being
  dead lettered due to `max-length-bytes` being exceeded.
2025-11-10 18:50:29 +01:00
David Ansari 960918e81f Fix quorum queue `drop-head` dead letter order
Prior to this commit, quorum queue at-most-once dead lettering
for the overflow behaviour `drop-head` was dead lettering in the wrong order.
2025-11-10 18:13:04 +01:00
Michael Klishin f4d290a4e9
Merge pull request #14904 from rabbitmq/shovel-parameters-refactor
Shovel: self-contained shovel protocols
2025-11-10 08:44:35 -08:00
Diana Parra Corbacho 797f645a18 Shovel tests: run unit_runtime_parameter_SUITE inside a broker
It needs the rabbit registry to select the protocols
2025-11-10 17:12:41 +01:00
Luke Bakken c481f39f11 Fix up `oauth2_client` ssl options
This uses the same technique as PR #12557 and #12564 to ensure that when
neither `cacerts` nor `cacertfile` are set, the system certs are used.
2025-11-10 07:46:38 -08:00
Michael Klishin 31011a6949
Do not include Makefiles into HEX_TARBALL_FILES
Per discussion in #14915.
2025-11-10 06:16:28 -08:00
Michael Klishin f8597e7878
Merge pull request #14918 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-3403da0d0f
[skip ci] Bump the dev-deps group across 4 directories with 2 updates
2025-11-09 18:09:17 -08:00
dependabot[bot] 1b9bd0cfab
[skip ci] Bump the dev-deps group across 4 directories with 2 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.rabbitmq:amqp-client](https://github.com/rabbitmq/rabbitmq-java-client).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).


Updates `com.google.googlejavaformat:google-java-format` from 1.31.0 to 1.32.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.31.0...v1.32.0)

Updates `com.rabbitmq:amqp-client` from 5.27.0 to 5.27.1
- [Release notes](https://github.com/rabbitmq/rabbitmq-java-client/releases)
- [Commits](https://github.com/rabbitmq/rabbitmq-java-client/compare/v5.27.0...v5.27.1)

Updates `com.google.googlejavaformat:google-java-format` from 1.31.0 to 1.32.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.31.0...v1.32.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.31.0 to 1.32.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.rabbitmq:amqp-client
  dependency-version: 5.27.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-08 18:04:36 +00:00
Michael Klishin 5f4ca99421
Fix rabbit_common, amqp_client, amqp10_client publishing to hex.pm
HEX_TARBALL_FILES included ../../rabbitmq-components.mk which
modern `rebar3 compile` considers to be unsafe and fails on
(quite reasonably).

FTR, the error looks like this:

````
===> Fetching rebar_alias v0.2.0
===> Analyzing applications...
===> Compiling rebar_alias
===> Verifying dependencies...
===> Fetching amqp_client v4.1.5
escript: exception error: no function clause matching
                 rebar_fetch:format_error({error,
                                           {hex_tarball,
                                            {inner_tarball,
                                             {"../../rabbitmq-components.mk",
                                              unsafe_path}}}}) (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar_fetch.erl, line 99)
  in function  rebar3:handle_error/2 (/home/runner/work/rebar3/rebar3/apps/rebar/src/rebar3.erl, line 383)
  in call from escript:run/2 (escript.erl, line 904)
  in call from escript:start/1 (escript.erl, line 418)
  in call from init:start_it/1
  in call from init:start_em/1
  in call from init:do_boot/3
```

Excluding this relative path addresses the issue.

rabbit_common/Makefile arguably does not need to
add any .mk files to the tarball but let's
deal with that in a separate change.
2025-11-06 14:51:53 -08:00
Michael Klishin 34c6ef4e2c
Merge pull request #14912 from rabbitmq/support-elixir-1.19
Allow Elixir 1.19
2025-11-06 14:01:15 -08:00
Michal Kuratczyk 0e172a9e73
Allow Elixir 1.19 2025-11-06 22:16:56 +01:00
Diana Parra Corbacho f2d05a4c37 Shovel: self-contained shovel protocols
Refactor protocol parsing & validation into their own modules
rabbit_shovel_behaviour is now a registry class, thus any new protocol
can add itself dinamically and is self-contained
2025-11-06 11:09:06 +01:00
Michael Klishin fd044249a2
Merge pull request #14897 from rabbitmq/registry-extensible-class
Rabbit registry: Dinamically allow to define new classes
2025-11-05 07:27:03 -08:00
Diana Parra Corbacho ca2bdfb5a6 Rabbit registry: Dinamically allow to define new classes
rabbit_registry classes are currently static, hard-coded in rabbit registry.
Dinamically searching for new classes using Erlang attributes allows
for plugins to add new classes and make use of the registry.
i.e. shovel protocols can benefit of this feature
2025-11-05 14:18:04 +01:00
Karl Nilsson 04b9c50b67
Merge pull request #14884 from rabbitmq/md/idempotent-stream-delete
rabbit_stream_coordinator: Handle delete_stream idempotently
2025-11-04 09:41:09 +00:00
Michael Klishin a82d9ab3c8
Merge pull request #14890 from rabbitmq/mk-swap-queue-for-lqueue
Shovel: swap queue for lqueue
2025-11-03 16:24:50 -08:00
Michael Klishin 7aa7433d91
Shovel: use lqueue over queue
the `queue' module is not aware of the queue
length, which means its `len/1` function is
O(n) while with `lqueue' it is O(1).

We rely on `queue:len/1' for a shovel metric,
so why not use a more efficient drop-in replacement
our team has developed in 2011.
2025-11-03 15:37:21 -08:00
Michael Klishin b905370bf0
Shovel: whitelist one more exception in amqp091_local_dynamic_SUITE 2025-11-03 15:34:05 -08:00
Michael Klishin 8325fb05b2
Merge pull request #14888 from amazon-mq/configure-stream-read-ahead
Optimization: make stream read-ahead limit configurable
2025-11-03 15:33:19 -08:00
Michael Davis f40cecd0a1
Add `stream.read_ahead_limit` config option 2025-11-03 17:12:13 -05:00
Michael Davis f4b9904281
Update osiris to v1.10.1 2025-11-03 17:12:05 -05:00
Michael Klishin 497d74d63d
Merge pull request #14873 from rabbitmq/shovel10-alarms
Shovel bugfix: handle cluster alarms in AMQP10 and local shovels
2025-11-03 11:11:17 -08:00
Michael Davis ebe3471c4f
rabbit_stream_coordinator: Handle delete_stream idempotently
Within `rabbit_stream_coordinator:delete_stream/2`, the stream could be
successfully deleted from the stream coordinator but the update to the
metadata store (`rabbit_amqqueue:internal_delete/2`) could fail
separately. If this happens then subsequent attempts to delete the
stream also fail because the coordinator did not reply to
`delete_stream` requests for unknown stream IDs.

This change has the stream coordinator reply `ok` when it receives a
`delete_stream` command and the stream is `undefined`. This would let
the `delete_stream/2` continue and remove the lingering state from the
metadata store.
2025-11-03 12:15:04 -05:00
Diana Parra Corbacho f0381159e7 Shovel local bugfix: handle cluster alarms
Local shovels must stop publishing when alarms are set in the destination
cluster. Messages are stored in memory and sent when the alarm clears,
the same way it is done for AMQP091
2025-11-02 21:05:15 +01:00
Michael Klishin e49ed938a2
Merge pull request #14880 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-64cba8005e
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
2025-11-01 18:12:23 -07:00
dependabot[bot] 4ebced0599
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 3 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework) and [com.squareup.okhttp3:okhttp-jvm](https://github.com/square/okhttp).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.14.0 to 5.14.1
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.14.0...r5.14.1)

Updates `com.squareup.okhttp3:okhttp-jvm` from 5.2.1 to 5.3.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-5.2.1...parent-5.3.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.squareup.okhttp3:okhttp-jvm
  dependency-version: 5.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 18:04:47 +00:00
Michael Klishin 227ad590c6
Merge pull request #14874 from amazon-mq/lukebakken/additional-ldap-schema-tests
Add a couple more LDAP schema tests
2025-10-31 13:14:50 -07:00
Michael Klishin 81d51f2885
Merge pull request #14765 from rabbitmq/vhost-default-metadata
rabbit_vhost: Set default description and tags in vhost metadata
2025-10-31 13:12:10 -07:00
Luke Bakken b2218e3783
Add a couple more LDAP schema tests
Follow-up to #14850

These tests are to ensure that queries expressed as single-lines are parsed correctly.
2025-10-31 12:10:13 -07:00
Diana Parra Corbacho 822f8003dd Shovel AMQP10 bugfix: handle errors when alarms are set
When an alarm is set in the destination cluster, the AMQP10 shovel
receives a remote_incoming_window_exceeded error. It must handle
it and retry the send later on, until the alarm is cleared
2025-10-31 19:15:37 +01:00
Diana Parra Corbacho c0b118ac28 Shovel tests: test disk alarm 2025-10-31 19:15:37 +01:00
Michael Klishin 396800ee0a
Update a test expectation #14765
(cherry picked from commit 2f6602b26d6b187e82149ac7041747ee97d7eebe)
2025-10-31 11:01:04 -07:00
Michael Klishin fdec97ddbd
Merge pull request #14794 from rabbitmq/shovel-tests
Shovel tests and bugfixes
2025-10-31 10:03:06 -07:00