Commit Graph

59372 Commits

Author SHA1 Message Date
Marcial Rosales 27b3e21554 Fix issue related to popup warning
And in particular locating the span#close button
2025-05-22 10:08:22 +02:00
Michael Klishin 6dd7447b92
Merge pull request #13929 from rabbitmq/queue-checks
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Use more idiomatic `maybe` feature
2025-05-21 21:51:43 +04:00
Michael Klishin dfa06d91ca
Merge pull request #13928 from rabbitmq/sac-policy
Delete single-active-consumer policy
2025-05-21 19:59:18 +04:00
David Ansari 3189686510 Add maybe_expr feature for OTP 26
GitHub action Build and Xref on OTP 26 errored with:
```
src/rabbit_quorum_queue.erl:252:9: syntax error before: ok
%  252|         ok ?= rabbit_queue_type_util:check_auto_delete(Q),
%     |         ^
```
2025-05-21 17:48:51 +02:00
David Ansari 4a3752a87f Use more idiomatic `maybe` feature 2025-05-21 17:32:04 +02:00
David Ansari 90e7e1065c Delete single-active-consumer policy
`single-active-consumer` shouldn't be listed under `unsupported_policies` for quorum
queues and streams because it isn't a valid policy in the first place, see
https://www.rabbitmq.com/docs/consumers#sac-cannot-be-enabled-with-a-policy
2025-05-21 17:11:16 +02:00
Michael Klishin 1679d0ced0
Merge pull request #13925 from rabbitmq/bump-up-chromedriver
Bump up chrome driver
2025-05-21 18:21:52 +04:00
Michael Klishin 6e0ba8e9ff
Merge pull request #13924 from rabbitmq/remove-unused-channel-field
Remove unused field in channel record.
2025-05-21 18:20:20 +04:00
Marcial Rosales a028db8156 Briefly explain how to start a second rabbitmq server
interactively
2025-05-21 15:50:29 +02:00
Marcial Rosales 44dd282ed4 Eliminate flake around listing live amqp connections 2025-05-21 15:15:35 +02:00
Marcial Rosales 6578c83a0e Bump up chrome driver
This is needed when running tests interactively.
The OS updates the local chrome binary and this
node.js library has to be upgraded too.
2025-05-21 14:10:30 +02:00
Karl Nilsson 542c0fe512 Remove unused field in channel record. 2025-05-21 09:22:36 +01:00
Michael Klishin 8199c0f401
Merge pull request #13920 from rabbitmq/md/prop-ra-indexes
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Add a proptest checking `ra_indexes` indices
2025-05-21 00:55:44 +04:00
Michael Davis 01b4051b03
Add a proptest checking `ra_indexes` indices
This is mostly the same as the `messages_total` property test but checks
that the Raft indexes in `ra_indexes` are the set of the indexes checked
out by all consumers union any indexes in the `returns` queue. This is
the intended state of `ra_indexes` and failing this condition could
cause bugs that would prevent snapshotting.
2025-05-20 10:34:18 -04:00
David Ansari 8546bcfecd
Merge pull request #13918 from rabbitmq/amqp-durable
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Follow AMQP spec for durable field
2025-05-20 13:20:55 +02:00
David Ansari 67895da04d Mention AMQP durable field in 4.2 release notes 2025-05-20 08:32:52 +02:00
David Ansari f8f1396c90 Follow AMQP spec for durable field
The AMQP spec defines:
```
<field name="durable" type="boolean" default="false"/>
```

RabbitMQ 4.0 and 4.1 interpret the durable field as true if not set.
The idea was to favour safety over performance.
This complies with the AMQP spec because the spec allows other target or
node specific defaults for the durable field:
> If the header section is omitted the receiver MUST assume the appropriate
> default values (or the meaning implied by no value being set) for the fields
> within the header unless other target or node specific defaults have otherwise
> been set.

However, some client libraries completely omit the header section if the
app expliclity sets durable=false. This complies with the spec, but it
means that RabbitMQ cannot diffentiate between "client app forgot to set
the durable field" vs "client lib opted in for an optimisation omitting
the header section".

This is problematic with JMS message selectors where JMS apps can filter
on JMSDeliveryMode. To be able to correctly filter on JMSDeliveryMode,
RabbitMQ needs to know whether the JMS app sent the message as
PERSISTENT or NON_PERSISTENT.

Rather than relying on client libs to always send the header section
including the durable field, this commit makes RabbitMQ comply with the
default value for durable in the AMQP spec.
Some client lib maintainers accepted to send the header section, while
other maintainers refused to do so:
https://github.com/Azure/go-amqp/issues/330
https://issues.apache.org/jira/browse/QPIDJMS-608

Likely the AMQP spec was designed to omit the header section when
performance is important, as is the case with durable=false. Omitting
the header section means saving a few bytes per message on the wire and
some marshalling and unmarshalling overhead on both client and server.

Therefore, it's better to push the "safe by default" behaviour from the broker
back to the client libs. Client libs should send messages as durable by
default unless the client app expliclity opts in to send messages as
non-durable. This is also what JMS does: By default JMS apps send
messages as PERSISTENT:
> The message producer's default delivery mode is PERSISTENT.

Therefore, this commit also makes the AMQP Erlang client send messages as
durable, by default.

This commit will apply to RabbitMQ 4.2.
It's arguably not a breaking change because in RabbitMQ, message durability
is actually more determined by the queue type the message is sent to rather than the
durable field of the message:
* Quroum queues and streams store messages durably (fsync or replicate)
  no matter what the durable field is
* MQTT QoS 0 queues hold messages in memory no matter what the
  durable field is
* Classic queues do not fsync even if the durable field is set to true

In addition, the RabbitMQ AMQP Java library introduced in RabbitMQ 4.0 sends messages with
durable=true:
53e3dd6abb/src/main/java/com/rabbitmq/client/amqp/impl/AmqpPublisher.java (L91)

The tests for selecting messages by JMSDeliveryMode relying on the
behaviour in this commit can be found on the `jms` branch.
2025-05-20 08:32:52 +02:00
Michael Klishin 4f1076d89c
Merge pull request #13916 from rabbitmq/otp28-fixes
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
OTP28: re:split change; street-address macro
2025-05-19 16:18:40 +04:00
Michal Kuratczyk 9fefcc4827
Remove rabbitmq_mqtt from DEPS (it's a TEST_DEP) 2025-05-19 09:40:05 +02:00
Michal Kuratczyk 637a2bc8cc
OTP28: re:split change; street-address macro
https://github.com/erlang/otp/issues/9739

In OTP28+, splitting an empty string returns an empty list, not an empty
string (the input).

Additionally `street-address` macro was removed in OTP28 - replace with
the value it used to be.

Lastly, rabbitmq_auth_backend_oauth2 has an MQTT test, so add
rabbitmq_mqtt to TEST_DEPS
2025-05-19 08:59:50 +02:00
Michael Klishin 4b714f4f7c
Merge pull request #13913 from rabbitmq/mk-ra-2.16.9
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Bump Ra to 2.16.9
2025-05-19 08:11:21 +04:00
Michael Klishin d68ca77ec5
Merge pull request #13912 from rabbitmq/mk-osiris-1.8.8
Bump Osiris to 1.8.8
2025-05-19 07:30:02 +04:00
Michael Klishin c2d6dee8e8
Bump Ra to 2.16.9 2025-05-18 23:26:46 -04:00
Michael Klishin 94575bc76d
Bump Osiris to 1.8.8 2025-05-18 22:46:40 -04:00
Michael Klishin 92a4d2c2ab
Merge pull request #13910 from rabbitmq/ik-queues-with-plugins-mgmt
Queues with plugins - Managment UI parts
2025-05-19 06:31:28 +04:00
Michael Klishin c29fc82158
Merge pull request #13909 from rabbitmq/ik-queue-protection-mgmt
Do not render Delete button for internal queues
2025-05-19 06:24:42 +04:00
Michael Klishin eb7634c678
Merge pull request #13905 from rabbitmq/ik-queues-with-plugins
Queues with plugins  - Core
2025-05-19 06:22:48 +04:00
Michael Klishin 551a300f78
Merge pull request #13903 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-5ac378ddf0
[skip ci] Bump the dev-deps group across 1 directory with 2 updates
2025-05-19 06:22:15 +04:00
Iliia Khaprov 180e7b1c1c
Queues with plugins - switch to get_queue_type in Management UI 2025-05-18 23:52:58 +02:00
Iliia Khaprov de17a77df4
Queues with plugins - Enable adding queues with plugins, Management UI 2025-05-18 23:52:58 +02:00
Iliia Khaprov 5fd3bddcfe
Protected queues - do not render Delete button for internal queues
with fix for rabbit_mgmt_wm_queue by MK
2025-05-18 23:50:53 +02:00
Iliia Khaprov bcdb0b7067
Queues with plugins - remove unused include form rabbit registry suite 2025-05-17 23:33:12 +02:00
Iliia Khaprov fd6b40c14a
Queues with plugins - adapt qos0 queue from MQTT plugin 2025-05-17 23:33:11 +02:00
Iliia Khaprov 3a33163d98
Queues with plugins - remove queue_topology callback 2025-05-17 23:33:11 +02:00
Iliia Khaprov 1eeaef4874
Queues with plugins - move is_(replicated->replicable) to capabilities 2025-05-17 23:33:11 +02:00
Iliia Khaprov 9ef170f4e7
Queues with plugins - short_alias_of spec fix 2025-05-17 20:48:14 +02:00
Iliia Khaprov c12c76ae45
Queues with plugins - sync with queue topologies updates 2025-05-17 20:48:09 +02:00
Iliia Khaprov 34f0d12dab
Queues with plugins - address Karl's comments
revive_local_queue_replicas -> revive_local_queue_members
can_redeliver converted from callback to capabilities key
rebalance_moduled converted from callback to capabilities key
2025-05-17 20:48:05 +02:00
Diana Parra Corbacho cfd51bac6c
Queues with plugins - fix rabbit_registry_SUITE 2025-05-17 20:48:00 +02:00
Iliia Khaprov 59701a0ea9
Queues with plugins - Diana's review 2025-05-17 20:47:55 +02:00
Diana Parra Corbacho 3f4fa167c5
Queues with plugins - tests, run amqqueue:to_printable in broker
It needs access to registry for the queue type
2025-05-17 20:47:49 +02:00
Iliia Khaprov e408c9e0f2
Queues with plugins - core 2025-05-17 20:47:43 +02:00
dependabot[bot] 988754ce85
[skip ci] Bump the dev-deps group across 1 directory with 2 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.


Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.20 to 2.1.21
- [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.1.20...v2.1.21)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.20 to 2.1.21

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.1.21
  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.1.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-17 18:40:58 +00:00
Michael Klishin abe306ed8e
Merge pull request #13899 from lukebakken/lukebakken/optional-deterministic-build
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Allow non-deterministic builds
2025-05-17 06:55:04 +04:00
Michael Klishin a0c6a0b41d
Merge pull request #13898 from rabbitmq/md/rabbit_mgmt_gc-memory
Improve memory use of `rabbit_mgmt_gc`
2025-05-17 03:58:44 +04:00
Luke Bakken eae657fc38
Allow non-deterministic builds
Building from source using this command:

```
make RMQ_ERLC_OPTS= FULL=1
```

... then starting RabbitMQ via `make run-broker`, allows re-compilation
from the erl shell:

```
1> c(rabbit).
Recompiling /home/lbakken/development/rabbitmq/rabbitmq-server/deps/rabbit/src/rabbit.erl
{ok,rabbit}
```

When `+deterministic` is passed to `erlc`, the `compile` data in each
modules' information is missing the source path for the module.

Follow-up to #3442
2025-05-16 12:45:19 -07:00
Michael Davis 5a32322778
rabbit_mgmt_gc: Switch from `gb_sets` to `sets` v2
`sets` v2 were not yet available when this module was written. Compared
to `gb_sets`, v2 `sets` are faster and more memory efficient:

    > List = lists:seq(1, 50_000).
    > tprof:profile(sets, from_list, [List, [{version, 2}]], #{type => call_memory}).

    ****** Process <0.94.0>  --  100.00% of total ***
    FUNCTION          CALLS   WORDS   PER CALL  [     %]
    maps:from_keys/2      1  184335  184335.00  [100.00]
                             184335             [ 100.0]
    ok
    > tprof:profile(gb_sets, from_list, [List], #{type => call_memory}).

    ****** Process <0.97.0>  --  100.00% of total ***
    FUNCTION                  CALLS   WORDS   PER CALL  [    %]
    lists:rumergel/3              1       2       2.00  [ 0.00]
    gb_sets:from_ordset/1         1       3       3.00  [ 0.00]
    lists:reverse/2               1  100000  100000.00  [16.76]
    lists:usplit_1/5          49999  100002       2.00  [16.76]
    gb_sets:balance_list_1/2  65535  396605       6.05  [66.48]
                                     596612             [100.0]
2025-05-16 14:23:24 -04:00
Michael Davis ce5d42a9d6
Hibernate after collecting garbage in `rabbit_mgmt_gc`
The `rabbit_mgmt_gc` gen_server performs garbage collections
periodically. When doing so it can create potentially fairly large
terms, for example by creating a set out of
`rabbit_exchange:list_names/0`. With many exchanges, for example, the
process memory usage can climb steadily especially when the management
agent is mostly idle since `rabbit_mgmt_gc` won't hit enough reductions
to cause a full-sweep GC on itself. Since the process is only active
periodically (once every 2min by default) we can hibernate it to GC the
terms it created.

This can save a medium amount of memory in situations where there are
very many pieces of metadata (exchanges, vhosts, queues, etc.). For
example on an idle single-node broker with 50k exchanges,
`rabbit_mgmt_gc` can hover around 50MB before being naturally GC'd. With
this patch the process memory usage stays consistent between `start_gc`
timer messages at around 1KB.
2025-05-16 14:16:58 -04:00
Aitor Pérez Cedres 98d1634ce3
Merge pull request #13890 from rabbitmq/tweak-oci-triggers
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
CI: tweak OCI workflow trigger
2025-05-13 16:49:13 +00:00
Michael Davis 314e4261fc
minor: Avoid flake in `rabbit_mgmt_http_health_checks_SUITE`
The `below_node_connection_limit_test` and `ready_to_serve_clients_test`
cases could possibly flake because `is_quorum_critical_single_node_test`
uses the channel manager in `rabbit_ct_client_helpers` to open a
connection. This can cause the line

     true = lists:all(fun(E) -> is_pid(E) end, Connections),

to fail to match. The last connection could have been rejected if the
channel manager kept its connection open, so instead of being a pid the
element would have been `{error, not_allowed}`.

With `rabbit_ct_client_helpers:close_channels_and_connection/2` we can
reset the connection manager and force it to close its connection.
2025-05-13 10:50:14 -04:00