Commit Graph

28092 Commits

Author SHA1 Message Date
Michael Klishin 4a01f3bbfa
Merge pull request #9980 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/kotlin.version-1.9.21
Bump kotlin.version from 1.9.20 to 1.9.21 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2023-11-23 13:59:38 -05:00
dependabot[bot] be576e2cb0
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.1.5 to 3.2.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.5...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 18:50:04 +00:00
dependabot[bot] f73dc281f7
Bump kotlin.version
Bumps `kotlin.version` from 1.9.20 to 1.9.21.

Updates `org.jetbrains.kotlin:kotlin-test` from 1.9.20 to 1.9.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/v1.9.20...v1.9.21)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 1.9.20 to 1.9.21

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 18:49:51 +00:00
dependabot[bot] 8e7076a289
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.1.5 to 3.2.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.5...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 18:17:52 +00:00
Karl Nilsson 61f13d0bb7 Add UUID conversion to mc_mqtt 2023-11-23 17:36:34 +00:00
Jean-Sébastien Pédron d24315de55
rabbitmq-dist.mk: Install CLI scripts as part of the build
... instead of the `dist` target.

[Why]
We already do that when building tests. Thus it is more consistent to do
the same.

Also, it makes sense to ensure everything is ready before the `dist`
step. For instance, an Erlang release would not depend on the `dist`
target, just the build and it would still need the CLI to be ready.
2023-11-23 12:40:14 +01:00
Michael Klishin c4d54e2c04
Avoid using magic quotes, simplify (c) line printed on node startup 2023-11-22 10:31:41 -05:00
Michael Klishin 1b642353ca
Update (c) according to [1]
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:18:22 -05:00
Michael Klishin 8d9ce84ab5
Merge pull request #9952 from rabbitmq/revert-elixir-json-switch
Revert elixir json switch
2023-11-20 06:45:07 -05:00
Michael Klishin 28ad76467e Management UI: link to GitHub Discussions and not the Google group 2023-11-19 19:35:49 -05:00
Johan Rhodin 851fddcad2 Fix wrong link 2023-11-17 16:48:39 -06:00
David Ansari 5a870df54c Fix AMQP connection throttling
Prior to this change the AMQP connection was never blocked, even in the
event of memory or disk alarms.
2023-11-17 19:12:18 +01:00
Johan Rhodin 226e7d138d fix info item, and behavior->behaviour 2023-11-17 11:01:47 -06:00
Michal Kuratczyk 32eba980f0
CLI: prune_code_paths: false 2023-11-17 13:09:31 +01:00
Michal Kuratczyk 93bb847798
Revert "Drop JSON from mix.exs #9926 #9932"
This reverts commit 8de8e0c18a.
2023-11-17 13:08:10 +01:00
Michal Kuratczyk db56f662af
Revert "Bazel bits for #9926"
This reverts commit 8d402e75b7.
2023-11-17 13:07:28 +01:00
Michal Kuratczyk 5459975c5c
Revert "Use rabbit_json in the CLI"
This reverts commit 6c65715875.
2023-11-17 13:05:38 +01:00
Arnaud Cogoluègnes f118d2fdce
Small refactor of stream tests 2023-11-17 10:49:12 +01:00
Arnaud Cogoluègnes 329988c483
Remove syntax test 2023-11-17 09:00:08 +01:00
Arnaud Cogoluègnes 0e5d15592a
Check virtual host queue limit on stream creation
Fixes #9910
2023-11-17 08:45:42 +01:00
Michael Klishin 422a7177b1
Fixes #9937 2023-11-16 19:18:13 -05:00
Michael Klishin 8de8e0c18a
Drop JSON from mix.exs #9926 #9932 2023-11-16 10:05:30 -05:00
Michael Klishin 8d402e75b7
Bazel bits for #9926 2023-11-16 09:46:19 -05:00
Michael Klishin 6bc62b0570
Merge pull request #9926 from rabbitmq/cli-remove-json-dep
Use rabbit_json in the CLI
2023-11-16 09:11:48 -05:00
David Ansari 95c5f2ec9e Some small fixes 2023-11-16 12:33:17 +01:00
Jean-Sébastien Pédron 4ebaf7d618
rabbit_khepri: Fix error handling with `net_adm:ping/1`
[Why]
The initial implementation was a bit too optimistic: it just asserted
that `net_adm:ping/1` returned pong. This led to a crash if it was not
the case.

[How]
It is better to handle an error from `net_adm:ping/1` and return
something appropriate instead of crashing. The rest of the function
already does that.

It improves the integration with peer discovery.
2023-11-16 12:13:24 +01:00
Michal Kuratczyk 6c65715875
Use rabbit_json in the CLI
dep_json doesn't seem to be maintained
and it's unnecessary anyway, since we can
use rabbit_json, which uses thoas
2023-11-16 00:01:14 +01:00
Michael Klishin 7dfebb9b7f
Merge pull request #9924 from rabbitmq/add-super-stream-binding-keys-alias
Add --binding-keys to add_super_stream command
2023-11-15 16:03:03 -05:00
Ayanda Dube 324debe6cf add a test case for mgmt API deletion of crashed queues 2023-11-15 17:43:47 +00:00
Ayanda Dube 1ce75c7aae handle different queue states on deletion from the mgmt API 2023-11-15 17:43:47 +00:00
Arnaud Cogoluègnes 739928153e
Add --binding-keys to add_super_stream command
It is meant to replace --routing-keys, which
is still available but not documented anymore.

This is to be consistent with AMQP 0.9.1 terminology.
2023-11-15 14:00:07 +01:00
Karl Nilsson c4fd947aad MC: various changes and improvements
To refine conversion behaviour add additional tests
and ensure it matches the documentation.

mc: optionally capture source environment

And pass target environment to mc:convert

This allows environmental data and configuration to be captured and
used to modify and complete conversion logic whilst allowing conversion
code to remain pure and portable.
2023-11-15 11:04:49 +00:00
Rin Kuryloski d81bfb46c0 Another attempt to fix the missing rabbit_framing.hrl error
when running the cli tests

copies rather than symlinks files into the ERL_LIBS dir when building
the cli
2023-11-15 09:51:05 +01:00
Michael Klishin 6d9e9b9cc9
Merge pull request #9813 from rabbitmq/super-stream-frames
Add super stream creation/deletion commands
2023-11-14 23:45:35 -05:00
Michael Klishin 2adec32449
Merge pull request #9909 from rabbitmq/rabbitmq-server-9894
Dynamic Shovels: support old (pre-3.13.0, 3.12.8) and new supervisor child ID formats
2023-11-14 07:10:58 -05:00
Michael Klishin 229a9fb7bd
list_policies_that_match: correctly format 'not found' errors as JSON 2023-11-13 21:35:48 -05:00
Michael Klishin 1ff5f6077b
mix format 2023-11-13 21:18:27 -05:00
Michael Klishin 8a76e903a3
One more test renaming to follow CLI conventions 2023-11-13 20:46:31 -05:00
Michael Klishin fd0488516b
diagnostics list_policies_that_match: support JSON formatting 2023-11-13 20:46:06 -05:00
Michael Klishin 2ebc23ef23
Use a standard CLI test suite file naming convention 2023-11-13 19:51:58 -05:00
Michael Klishin c4db560e0e
CLI: mix format 2023-11-13 11:21:29 -05:00
Arnaud Cogoluègnes 5e1155c523
Fix function spec 2023-11-13 16:30:37 +01:00
Arnaud Cogoluègnes 22698a4adc
Simplify maybe block 2023-11-13 15:55:08 +01:00
Arnaud Cogoluègnes 2eb9b5f87b
Make sure partitions and binding keys counts are equal 2023-11-13 15:48:23 +01:00
Arnaud Cogoluègnes 9beda5702e
Use "binding key" lingo for super stream creation
Instead of "routing key".
2023-11-13 14:54:45 +01:00
Michal Kuratczyk 408c33ec49
Add list_policies_that_match command 2023-11-13 13:47:54 +01:00
Arnaud Cogoluègnes 809e97fd38
Use maybe syntax for super stream management permissions 2023-11-13 10:30:26 +01:00
Arnaud Cogoluègnes 043ddcba95
Add super stream creation/deletion test 2023-11-13 10:30:25 +01:00
Arnaud Cogoluègnes c352eed64a
Fix specification 2023-11-13 10:30:25 +01:00
Arnaud Cogoluègnes d04ccdb0ce
Return correct frame name 2023-11-13 10:30:25 +01:00
Arnaud Cogoluègnes 388608143d
Add super stream add/delete protocol commands 2023-11-13 10:30:25 +01:00
Arnaud Cogoluègnes 15f93f338c
Add super stream creation/deletion commands in spec 2023-11-13 10:30:24 +01:00
Michael Klishin 28741cdf68 Dynamic Shovels: filter out old supervisor child IDs
So that they do not make it to Khepri.
2023-11-12 23:22:01 -05:00
Michael Klishin 2ce0307641
Dynamic Shovels: support old and new supervisor child ID formats
During a rolling upgrade, all cluster nodes collectively
may (and usually will, due to Shovel migration during node restarts)
contain mirrored_supervisor children with IDs that use two different
parameters (see referenced commits below).

The old format should not trip up node startup, so new
nodes must accept it in a few places, and try to use
these older values during dynamic Shovel spec cleanup.

References ccc22cb86b, 5f0981c5a3, #9785.

See #9894.
2023-11-12 20:51:33 -05:00
Michal Kuratczyk b2c01e3e8e
Remove dialyxir from bazel 2023-11-10 15:37:11 +01:00
Michal Kuratczyk 1ffae77442
Bump CLI deps, remove dialyxir 2023-11-10 15:31:12 +01:00
Jean-Sébastien Pédron 09a95a5235
Merge pull request #9875 from rabbitmq/logger-exchange-wait-for-init
Logger exchange: fix race condition during initialisation
2023-11-09 13:50:51 +01:00
Michael Klishin ac09b6e384
Merge pull request #9869 from rabbitmq/cli-commands-for-mirroring-deprecation
CLI commands for mirroring deprecation
2023-11-08 18:12:41 -05:00
Michael Klishin 4e58ad9dad CLI: two more test suites 2023-11-08 16:49:53 -05:00
Michael Klishin 5deacfc4ab
Merge pull request #9896 from rabbitmq/opt-mgmt-queue-listings
Fix streams minority calculation
2023-11-08 09:23:05 -05:00
Diana Parra Corbacho 55f724aedb Logger exchange: fix race condition during initialisation
The logger exchange needs to declare the exchange during initialisation,
which requires the metadata store to be ready.
Metadata store initalisation happens in a rabbit boot step after
logger initialisation in the second phase of the prelaunch.
The spawned process that declares the exchange, should also
wait for the store to be ready. Otherwise it enters a loop
trying to decide which store to use which generates a huge log
and delays initialisation:
'Mnesia->Khepri fallback handling: Mnesia function failed because table
 `rabbit_vhost` is missing or read-only. Migration could be in progress;
 waiting for migration to progress and trying again...'

This commit gives it 60 seconds for the metadata store to boot,
and only afterwards tries (and retries if needed) to declare the
exchange.
2023-11-08 12:54:02 +01:00
Karl Nilsson 8d2c0a6425 Add tests for rabbit_queue_type:format/2
For streams and quorum queues, classic are tested in many other
places including mgmt tests.
2023-11-08 10:27:01 +00:00
David Ansari e99aa68ea4 Fix coverage
Dependency horus broke coverage on `main` branch.

After this commit, on `main` branch in rabbitmq-server root
directory, both show coverage:

1.
```
make -C deps/rabbitmq_mqtt ct-auth t=[v5,limit]:vhost_queue_limit FULL=1 COVER=1
open deps/rabbitmq_mqtt/logs/index.html
```

2.
```
bazel coverage //deps/rabbitmq_mqtt:auth_SUITE -t- --test_sharding_strategy=disabled --test_env FOCUS="-group [v5,limit] -case vhost_queue_limit"
genhtml --output genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat"
open genhtml/index.html
```
where `genhtml` is
https://github.com/linux-test-project/lcov/blob/master/bin/genhtml

Prior to this commit, coverage was broken with both Bazel and Erlang.mk:

On main - below logs are printed in different outputs:
First:
```
*** CT 2023-11-07 16:40:04.959 *** COVER INFO🔗
Adding nodes to cover test: ['rmq-ct-reader_SUITE-1-21000@localhost']
```

followed by
```
Could not start cover on 'rmq-ct-reader_SUITE-1-21000@localhost': {error,
                                                                   {already_started,
                                                                    <20798.286.0>}}
```

followed by
```
*** CT 2023-11-07 16:40:04.960 *** COVER INFO🔗
Successfully added nodes to cover test: []
```

followed by
```
Error in process <0.202.0> on node ct_rabbitmq_mqtt@nuc with exit value:
{{badmatch,{ok,[]}},
 [{rabbit_ct_broker_helpers,'-cover_add_node/1-fun-0-',1,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,2211}]},
  {rabbit_ct_broker_helpers,query_node,2,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,824}]},
  {rabbit_ct_broker_helpers,run_node_steps,4,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,447}]},
  {rabbit_ct_broker_helpers,start_rabbitmq_node,4,
                            [{file,"rabbit_ct_broker_helpers.erl"},
```

It's also worth mentioning that
`make run-broker`
on v3.12.x:
```
  Starting broker... completed with 36 plugins.
1> whereis(cover_server).
undefined
```
but on main:
```
  Starting broker... completed with 36 plugins.
1> whereis(cover_server).
<0.295.0>
```
So, process `cover_server` runs on main in non test code.
2023-11-08 10:49:03 +01:00
Karl Nilsson 62b675969f fix streams minority calculation 2023-11-08 09:04:53 +00:00
Michael Klishin e52772057c
Merge pull request #9874 from rabbitmq/opt-mgmt-queue-listings
Optimise HTTP API /queues endpoint
2023-11-07 14:30:42 -05:00
dependabot[bot] 9e963c97ef
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:51:41 +00:00
Michael Klishin b54ec8d04a
Merge pull request #9889 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2023-11-07 13:36:23 -05:00
Michael Klishin 4e0df85d30
Merge pull request #9887 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2023-11-07 13:36:10 -05:00
dependabot[bot] c3676c6c79
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:30:48 +00:00
dependabot[bot] 37acb08feb
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:25:28 +00:00
dependabot[bot] d9c1406f62
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:14:33 +00:00
Karl Nilsson baff660ab4 use right dummy type 2023-11-07 11:53:57 +00:00
David Ansari 5b18e9d982 Avoid warning of unhandled message
Prior to this commit:
1. Start RabbitMQ with MQTT plugin enabled.
2.
```
rabbitmq-diagnostics consume_event_stream
^C
```
3. The logs will print the following warning:
```
[warning] <0.570.0> ** Undefined handle_info in rabbit_mqtt_internal_event_handler
[warning] <0.570.0> ** Unhandled message: {'DOWN',#Ref<0.2410135134.1846280193.145044>,process,
[warning] <0.570.0>                               <52723.100.0>,noconnection}
[warning] <0.570.0>
```

This is because rabbit_event_consumer:init/1 monitors the CLI process.

Any rabbit_event handler should therefore implement handle_info/2.

It's similar to what's described in the gen_event docs about
add_sup_handler/3:
> Any event handler attached to an event manager which in turn has a
> supervised handler should expect callbacks of the shape
> Module:handle_info({'EXIT', Pid, Reason}, State).
2023-11-07 12:33:02 +01:00
Karl Nilsson ff12d3b6b4 HTTP API /queues optimise resource_exists
There is no need to list all queues to check if the vhost
exists.
2023-11-07 11:27:11 +00:00
Karl Nilsson 9cf6454973 Expose rabbit_quorum_queue:infos/2
To allow callers to specify a subset of fields they'd like.
2023-11-07 09:20:52 +00:00
Karl Nilsson d77f937ff4 tweak 2023-11-07 08:48:57 +00:00
Arnaud Cogoluègnes 1ada0fd97f
Merge pull request #9883 from rabbitmq/dependabot/maven/deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests/main/org.junit.jupiter-junit-jupiter-engine-5.10.1
Bump org.junit.jupiter:junit-jupiter-engine from 5.10.0 to 5.10.1 in /deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests
2023-11-07 09:02:16 +01:00
Michael Klishin a88c22144d CLI: mix format 2023-11-06 23:03:41 -05:00
Michael Klishin 114f9b90c9 CLI: refactor 'diagnostics check_if_any_deprecated_features_are_used' 2023-11-06 22:50:35 -05:00
Michael Klishin 9eecc15737
Merge pull request #9882 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.junit.jupiter-junit-jupiter-5.10.1
Bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2023-11-06 14:14:12 -05:00
dependabot[bot] 4cbe61362d
Bump org.junit.jupiter:junit-jupiter-engine
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:57:18 +00:00
dependabot[bot] 0664b7ec7b
Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:46:05 +00:00
dependabot[bot] 818d68695f
Bump org.junit.jupiter:junit-jupiter-params
Bumps [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:41:57 +00:00
Diana Parra Corbacho 51783e9464 CLI: check if any deprecated features are used returns just the list of features 2023-11-06 17:45:11 +01:00
Karl Nilsson c2cd60b18d Optimise mgmt HTTP API /queues endpoint
Listing queues with the HTTP API when there are many (1000s) of
quorum queues could be excessively slow compared to the same scenario
with classic queues.

This optimises various aspects of HTTP API queue listings.
For QQs it removes the expensive cluster wide rpcs used to get the
"online" status of each quorum queue. This was previously done _before_
paging and thus would perform a cluster-wide query for _each_ quorum queue in
the vhost/system. This accounted for most of the slowness compared to
classic queues.

Secondly the query to separate the running from the down queues
consisted of two separate queries that later were combined when a single
query would have sufficed.

This commit also includes a variety of other improvements and minor
fixes discovered during testing and optimisation.

MINOR BREAKING CHANGE: quorum queues would previously only display one
of two states: running or down. Now there is a new state called minority
which is emitted when the queue has at least one member running but
cannot commit entries due to lack of quorum.

Also the quorum queue may transiently enter the down state when a node
goes down and before its elected a new leader.
2023-11-06 15:34:26 +00:00
Michael Klishin cbe2756cbd CLI: tests and refactoring for 'diagnostics check_if_cluster_has_classic_queue_mirroring_policy' 2023-11-06 07:20:08 -05:00
Michael Klishin 827b495d1a CLI: wording 2023-11-06 07:20:08 -05:00
Michael Klishin b725bba735 CLI: add a test for 'ctl remove_classic_queue_mirroring_from_policies' 2023-11-06 07:20:08 -05:00
Diana Parra Corbacho 6288e9aa2c CTL: check if any deprecated features are used command 2023-11-06 07:20:08 -05:00
Diana Parra Corbacho 13e88ced92 Use Diagnostics group 2023-11-06 07:20:08 -05:00
Michael Klishin ae934d9ebc CLI: mix format 2023-11-06 07:20:08 -05:00
Diana Parra Corbacho 70c97be06c CLI: command to remove all classic queue mirroring policies 2023-11-06 07:20:08 -05:00
Diana Parra Corbacho a06698d43d CLI: command to check if cluster has a classic queue mirroring policy 2023-11-06 07:20:08 -05:00
Diana Parra Corbacho 8df94cc13c CLI: commands to list policies / operator policies with CMQ
rabbitmq-queues list_operator_policies_with_classic_queue_mirroring
rabbitmq-queues list_policies_with_classic_queue_mirroring
2023-11-06 07:20:08 -05:00
David Ansari 552775ead9 Fix dialyzer in OTP 25 2023-11-03 14:57:05 +01:00
David Ansari a6996ab1bc Fix error insufficient_credit for AMQP 1.0 shovel
WHY:

Shovelling from RabbitMQ to Azure Service Bus and Azure Event Hub fails.

Reported in
https://discord.com/channels/1092487794984755311/1092487794984755314/1169894510743011430

Reproduction steps:
1. Follow https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-integrate-with-rabbitmq
2. Publish messages to RabbitMQ:
```
java -jar target/perf-test.jar -x 1 -y 0 -u azure -p -C 100000 -s 1 -c 100000
```

Prior to this commit, after a few seconds and after around 20k messages
arrived in Azure, RabbitMQ errored and logged:
```
{function_clause,
    [{amqp10_client_connection,close_sent,
         [info,
          {'EXIT',<0.949.0>,
              {{badmatch,{error,insufficient_credit}},
               [{rabbit_amqp10_shovel,forward,4,
                    [{file,"rabbit_amqp10_shovel.erl"},
                     {line,334}]},
                {rabbit_shovel_worker,handle_info,2,
                    [{file,"rabbit_shovel_worker.erl"},
                     {line,101}]},
                {gen_server2,handle_msg,2,
                    [{file,"gen_server2.erl"},{line,1056}]},
                {proc_lib,init_p_do_apply,3,
                    [{file,"proc_lib.erl"},{line,241}]}]}},
```

After this commit, all 100k messages get shovelled to Azure Service Bus.

HOW:

1. Fix link credit accounting in Erlang AMQP 1.0 client library. For each
message being published, link credit must be decreased by 1 instead of
being increased by 1.

2. If the shovel plugin runs out of credits, it must wait until the
   receiver (Azure Service Bus) grants more credits to RabbitMQ.

Note that the solution in this commit is rather a naive quick fix for one
obvious bug. AMQP 1.0 integration between RabbitMQ and Azure Service Bus is
not tested and not guaranteed at this point in time.
More work will be needed in the future, some work is done as part of
https://github.com/rabbitmq/rabbitmq-server/pull/9022
2023-11-03 12:43:49 +01:00
David Ansari d1940c997e Fix Khepri flake
Previously, test pubsub was flaky
```
{shared_SUITE,pubsub,766}
{test_case_failed,missing m1}
```
because the binding wasn't present yet on node 0 when publishing to node
0.
2023-11-03 09:52:53 +01:00
David Ansari 75e777b833 Provide more debug output for flaky test
In
https://github.com/rabbitmq/rabbitmq-server/actions/runs/6735035912/job/18308551274?pr=9865
test
```
bazel test //deps/rabbitmq_mqtt:v5_SUITE -t- --test_sharding_strategy=disabled \
    --test_env FOCUS="-group [mqtt,cluster_size_1] -case will_delay_equals_session_expiry" \
    --test_env RABBITMQ_METADATA_STORE=mnesia --config=rbe-26 --runs_per_test=100
```
seems to flake.
2023-11-02 18:40:38 +01:00
Jean-Sébastien Pédron 9d4a53380e
rabbit_khepri: Use `ra:key_metrics/1` instead of querying the internal state
[Why]
`rabbit_khepri` relied on undocumented internals of Ra. This made this
code very fragile and not future-proof at all.

[How]
Ra exposes a new `ra:key_metrics/1` API which fullfills the need. This
patch uses it.

At a consequence, we can get rid of the Dialyzer directives to turn off
some warnings.
2023-11-02 16:39:44 +01:00
Michael Klishin 3d8945fbb0
Merge pull request #9820 from dukex/improve-login-exp
Redirect user back to landing page
2023-11-01 16:33:57 -04:00
Johan Rhodin 0b2a94c1ec
Update RabbitMQ-Overview.json
Global counters for producers added in https://github.com/rabbitmq/rabbitmq-server/pull/3127 but never made it to this dashboard
2023-11-01 13:23:41 -05:00
Emerson Almeida 9c87e1902d remove test to idp-initiated 2023-11-01 10:23:02 -03:00
Emerson Almeida 64ded4632d make the baseUrl equal when run with prefix 2023-11-01 09:52:27 -03:00
Michael Klishin 9bab2f255c
Pass Dialyzer 2023-11-01 06:48:36 -04:00
Iliia Khaprov c577e04b73 Remove POODLE check, we are in the future 2023-11-01 10:53:27 +01:00
Iliia Khaprov 728dd57ffc Use application:get_env/3 2023-11-01 10:53:05 +01:00
dependabot[bot] c73dfc6ca2
Bump kotlin.version
Bumps `kotlin.version` from 1.9.10 to 1.9.20.

Updates `org.jetbrains.kotlin:kotlin-test` from 1.9.10 to 1.9.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/commits)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 1.9.10 to 1.9.20

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 18:58:51 +00:00
Duke ca5e7e34d7
Merge branch 'main' into improve-login-exp 2023-10-31 13:35:20 -03:00
Marcial Rosales 7c58649942 Reduce by 5 seconds every oauth2 test
clickToLogin sbould only check that the
login button exists and not that the
warning messages is not visible
2023-10-31 16:31:37 +01:00
Marcial Rosales b409d97927 Bump up chromedriver version 2023-10-31 14:07:38 +01:00
Marcial Rosales c169f6ef50 Fix issue in run-scripts 2023-10-31 12:55:31 +01:00
Michael Klishin 9b6cb03b0a
Merge pull request #9831 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/com.squareup.okhttp3-okhttp-4.12.0
Bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2023-10-30 15:03:06 -04:00
dependabot[bot] ecf324e44b
Bump org.apache.qpid:qpid-jms-client
Bumps org.apache.qpid:qpid-jms-client from 2.4.0 to 2.5.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 19:02:22 +00:00
dependabot[bot] 34edd8badc
Bump com.squareup.okhttp3:okhttp
Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.11.0 to 4.12.0.
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.11.0...parent-4.12.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 18:58:23 +00:00
Duke 175634e2f8
Merge branch 'main' into improve-login-exp 2023-10-30 12:03:41 -03:00
Duke cd680bc568
move store pref to startWithOAuthLogin 2023-10-30 12:02:29 -03:00
Duke 9060941fc2
Remove overview var from redirection-after-login.js 2023-10-30 11:51:59 -03:00
Duke 0e757f394a
remove unused overview var 2023-10-30 11:50:23 -03:00
Michael Klishin 67285d60d0
Merge pull request #9827 from rabbitmq/fix-mqtt-khepri-flake
Fix test flake session_takeover_v3_v5
2023-10-30 09:32:57 -04:00
David Ansari a5f4317c3f Fix test flake session_takeover_v3_v5
Prior to this commit the follwing test was flaky:
```
bazel test //deps/rabbitmq_mqtt:v5_SUITE -t- --test_sharding_strategy=disabled \
    --test_env FOCUS="-group [mqtt,cluster_size_3] -case session_takeover_v3_v5" \
    --test_env RABBITMQ_METADATA_STORE=khepri --config=rbe-26 --runs_per_test=20
```
because rabbit_misc:maps_any/2 filtered out a destination queue after routing if
that destination queue wasn't associated with any matched binding key.

This commit makes the test green.

However, the root cause of this issue isn't solved:
MQTT 5.0 requires the topic exchange to return matched binding keys for
destination queues such that feature NoLocal, and Subscription
Identifiers work correctly.

The current MQTT plugin relies on session state to be stored
consistently in the database. When a new client connects, the session
state is retrieved from the database and appropriate actions are taken:
e.g. consume from a queue, modify binding arguments, etc.

With Mnesia this consistency was guaranteed thanks to sync transactions
when updating queues and bindings.

Khepri has only eventual consistency semantics. This is problematic for the
MQTT plugin in the session_takeover_v3_v5 test scenario:

1. Client subscribes on node 1 (with v3). Node 1 returns subscription
   success to client.
2. **Thereafter**, another client with the same MQTT client ID connects
   to node 0 (with v5). "Proper" session takeover should take place.
   However due to eventual consistency, the subscription / binding isn't
   present yet on node 0. Therefore the session upgrade from v3 to v5
   does not take place and leads to binding keys being absent when
   messages are routed to the session's queue.
2023-10-30 09:39:49 +01:00
Diana Parra Corbacho 2d4854c443 Khepri migration: match expected records
During metadata store migration, Mnesia might generate messages
for Table-Key pairs for in-flight writes.
These are skipped by mnesia-khepri-migration, as do not contain
enough info to copy the record, but we ensure here that none
comes through and we try to process it.

The event with Table-Record is generated at the time of write,
which is properly processed after the initial copy of data.
2023-10-30 09:09:53 +01:00
Emerson Almeida 7bf452c522 fix pref default 2023-10-29 18:34:42 -03:00
Emerson Almeida 7525ccc236 add tests 2023-10-29 18:34:42 -03:00
Duke 3e0ca9ede7 add oauth-return-to 2023-10-29 18:34:42 -03:00
Ayanda Dube ecf3549c52 handle autoheal winner_waiting state with a chosen winner to avoid crashing node monitor 2023-10-27 12:07:09 -04:00
David Ansari 43dfa4d6ac Fix MQTT test flakes
Tests session_reconnect and session_takeover were flaky, specifically
when run under Khepri.

The issue was in the test itself that the connect properties didn't
apply. Therefore, prior to this commit an exclusive queue got created.
2023-10-27 17:30:41 +02:00
David Ansari 7cd91a8fd2 Do not skip test
On `main` branch and v3.12.6 feature flag delete_ra_cluster_mqtt_node is
supported. Instead of skipping the entire test if that feature flag is
not enabled, enable the feature flag and run the test.

More generally:
"Instead of verifying if a feature flag is enabled or not, it's best to enable
it and react from the return value (success or failure).
Mixed version testing always turn off all feature flags by default.
So in the future, even though all nodes supports the mentionned
feature flag, the testcase will still be skipped." [JSP]
2023-10-27 16:49:13 +02:00
David Ansari c8b90488e7 Skip some assertions in mixed version tests
See commit message 00c77e0a1a for details.

In a multi node mixed version cluster where the lower version is
compiled with a different OTP version, anonymous Ra leader queries will
fail with a badfun error if initiated on the higher version and executed
on the leader on the lower version node.
2023-10-27 15:12:51 +02:00
Michael Klishin bc16e9fa27
Merge pull request #9810 from rabbitmq/port_command
Remove erlang:port_command/2 hack
2023-10-27 06:11:14 -04:00
David Ansari db359fd59d
Update README.md 2023-10-27 11:52:40 +02:00
David Ansari cad067f5fa Remove erlang:port_command/2 hack
as selective receives are efficient in OTP 26:
```
OTP-18431
Application(s):
compiler, stdlib
Related Id(s):
PR-6739
Improved the selective receive optimization, which can now be enabled for references returned from other functions.
This greatly improves the performance of gen_server:send_request/3, gen_server:wait_response/2, and similar functions.
```
2023-10-27 10:37:56 +02:00
David Ansari 7c061f3eaf Use new OTP 26 fun ets:lookup_element/4
Routing to nowhere with the direct exchange is now a bit faster:
```
java -jar target/perf-test.jar -x 2 -y 0 -k route-nowhere -z 60
```
2023-10-27 10:02:07 +02:00
Michael Klishin 673548f343
Merge pull request #9805 from rabbitmq/skip-maintenance
Skip test maintenance in mixed version mode
2023-10-27 03:31:27 -04:00
Michael Klishin aaed0e676b
Merge pull request #9807 from rabbitmq/unskip-duplicate-client-id
Run test duplicate_client_id with Khepri
2023-10-27 03:31:13 -04:00
David Ansari c914e43097 Do not enable OTP feature at runtime
Since Erlang/OTP 26:
```
OTP-18445
Application(s):
erts, stdlib
It is no longer necessary to enable a feature in the runtime system in order to load modules that are using it.
It is sufficient to enable the feature in the compiler when compiling it.
That means that to use feature maybe_expr in Erlang/OTP 26, it is sufficient to enable it during compilation.
In Erlang/OTP 27, feature maybe_expr will be enabled by default, but it will be possible to disable it.
```
2023-10-27 09:26:31 +02:00
David Ansari 5cbeedffd9 Run test duplicate_client_id with Khepri
The only reason to skip tests with Khepri is if they use
classic mirror queues or use Mnesia directly.
2023-10-27 09:15:14 +02:00
David Ansari 00c77e0a1a Skip test maintenance in mixed version mode
This test fails when MQTT client ID tracking is performed in Ra, and the
higher version node gets compiled with a different OTP version (26) than
the lower version node (25).

The reason is described in 83eede7ef2
```
An interesting side note learned here is that the compiled file
rabbit_mqtt_collector must not be changed. This commit only modifies
function specs. However as soon as the compiled code is changed, this
module becomes a new version. The new version causes the anonymous ra query
function to fail in mixed clusters: When the old node does a
ra:leader_query where the leader is on the new node, the query function
fails on the new node with `badfun` because the new node does not have
the same module version. For more context, read:
https://web.archive.org/web/20181017104411/http://www.javalimit.com/2010/05/passing-funs-to-other-erlang-nodes.html
```

We shouldn’t use an anonymous function for ra:leader_query or ra:consistent_query.
Instead we should use the {M,F,A} form.
9e5d437a0a/src/ra.erl (L102-L103)

In MQTT the anonymous function is used in bcb95c949d/deps/rabbitmq_mqtt/src/rabbit_mqtt_collector.erl (L50)
This causes the query to return a bad fun error (silently ignored in bcb95c949d/deps/rabbitmq_mqtt/src/rabbit_mqtt_collector.erl (L70-L71) )
when executed on a different node and either:
1.) Any code in file rabbit_mqtt_collector.erl changed, or
2.) The code gets compiled with a different OTP version.

2.) is the reason for a failing mixed version test in https://github.com/rabbitmq/rabbitmq-server/pull/8553 because both higher and lower versions run OTP 26,
but the higher version node got compiled with 26 while the lower version node got compiled with 25.

The same file
compiled with OTP 26.0.1
```
1> rabbit_mqtt_collector:module_info(attributes).
[{vsn,[30045739264236496640687548892374951597]}]
```

compiled with OTP 25.3.2
```
1> rabbit_mqtt_collector:module_info(attributes).
[{vsn,[168144385419873449889532520247510637232]}]
```

Due to the very low impact that maintenance mode will not close all MQTT
client connections with feature flag delete_ra_cluster_mqtt_node being
disabled, we skip this test.
2023-10-27 08:51:00 +02:00
Michael Klishin 2a27132290
Merge pull request #9794 from rabbitmq/qq-open-files-fix
Fix quorum queue open files info
2023-10-26 16:32:19 -04:00
Michael Klishin be450bd04e
Merge pull request #9785 from rabbitmq/faster-shovel-start
Speed up shovel start
2023-10-26 12:33:20 -04:00
Karl Nilsson 0693d6453d Fix quorum queue open files info
At some point Ra stopped updating the ra_open_files_metrics table
in favour of using counters. This change updates the
rabbit_quorum_queue:open_files/1 function to use ra counters instead
of querying the deprecated ETS table.
2023-10-26 14:50:42 +01:00
Michael Klishin 20b31791f1
Merge pull request #9790 from rabbitmq/qq-oldest-entry-timestamp-fd-leak-fix
Fix a file descriptor leak in an aux command handler
2023-10-26 09:18:42 -04:00
Michael Klishin 2e9400ab06
Merge pull request #9782 from rabbitmq/join_cluster-handles-stop-start-automatically
rabbit_db: `join/2` now takes care of stopping/starting RabbitMQ
2023-10-26 09:14:42 -04:00
Karl Nilsson 14da3a1f82 Fix fd leak in rabbit_fifo
The handle_aux clause for `oldest_entry_timestamp` did not return
the updated Log structure and thus ends up leaking file descriptors
when this function is called and the segment isn't already open.
2023-10-26 13:58:44 +01:00
Michal Kuratczyk 015be9336c
Speed up shovel start and cleanup
The filtering was incorrect, so we ended up trying to delete
all existing shovels. Running shovels would reject the attempt,
so things generally worked as expected, but this redundant work
was quite costly.

In a test with 1000 shovels, this change speeds up a definition import
from a few minutes to a few seconds.

Fixes https://github.com/rabbitmq/rabbitmq-server/discussions/9714
Fixes https://github.com/rabbitmq/rabbitmq-server/issues/8364
2023-10-26 13:13:32 +02:00
Jean-Sébastien Pédron a26f95d26d
rabbitmq-run.mk: No need to {stop,start}_app when clustering
[Why]
`rabbitmqctl join_cluster` now takes care of stopping and restarting
whatever needs to be dealt with.
2023-10-26 11:22:48 +02:00
Jean-Sébastien Pédron b15eb0ff1b
rabbit_db: `join/2` now takes care of stopping/starting RabbitMQ
[Why]
Up until now, a user had to run the following three commands to expand a
cluster:
1. stop_app
2. join_cluster
3. start_app

Stopping and starting the `rabbit` application and taking care of the
underlying Mnesia application could be handled by `join_cluster`
directly.

[How]
After the call to `can_join/1` and before proceeding with the actual
join, the code remembers the state of `rabbit`, the Feature flags
controler and Mnesia.

After the join, it restarts whatever needs to be restarted to. It does
so regardless of the success or failure of the join. One exception is
when the node switched from Mnesia to Khepri as part of that join. In
this case, Mnesia is left stopped.
2023-10-26 11:22:47 +02:00
Jean-Sébastien Pédron 6bce645822
rabbit_feature_flags: Log when the controller is starting
[Why]
This is to be consistent with the fact that it logs something when it
exits. It also helps while debugging it.
2023-10-26 10:04:14 +02:00
Jean-Sébastien Pédron 076becf96d
rabbit_feature_flags: Expose `rabbit_ff_controller:is_running/0`
[Why]
It will be used to check the status of the Feature flags controller in a
future change to `rabbit_db_cluster:join/2`.

[How]
We check if the process is registered locally.
2023-10-26 10:04:14 +02:00
Jean-Sébastien Pédron 5e21df8009
rabbit_feature_flags: Use `rabbit_sup:stop_child/1` to stop the controller
[Why]
In addition to stopping the supervisor child, `rabbit_sup` also takes
care of deleting the child spec from the supervisor.

This allows to re-use `rabbit_sup:start_child/1`. Otherwise, it would
return an `{error, already_present}` error.
2023-10-26 10:04:14 +02:00
Michael Klishin 680c36d509 Require Erlang/OTP 26.0 (ERTS 14.0) 2023-10-25 22:53:57 -04:00
dependabot[bot] 1d9524ea98
Bump com.rabbitmq:amqp-client
Bumps [com.rabbitmq:amqp-client](https://github.com/rabbitmq/rabbitmq-java-client) from 5.19.0 to 5.20.0.
- [Release notes](https://github.com/rabbitmq/rabbitmq-java-client/releases)
- [Commits](https://github.com/rabbitmq/rabbitmq-java-client/compare/v5.19.0...v5.20.0)

---
updated-dependencies:
- dependency-name: com.rabbitmq:amqp-client
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 18:55:23 +00:00
David Ansari fb18ddf42c Deduplicate code 2023-10-25 15:58:13 +02:00
Michael Klishin e365a99410
Merge pull request #9767 from rabbitmq/mk-amqp10-client-credential-obfuscation
AMQP 1.0 Erlang client: integrate credentials_obfuscation
2023-10-24 20:03:20 -04:00
Michael Klishin fbc443865e
Use application:ensure_all_started/1 with a single value
for Erlang 25.3 compatibility.
2023-10-24 19:43:03 -04:00
Michael Klishin 5c91495e75
Merge pull request #9770 from rabbitmq/lukebakken/handle-possible-not_found-binding
Handle `{error, not_found}` case when recovering a binding
2023-10-24 17:43:43 -04:00
Michael Klishin 69826d8f16
Merge pull request #9774 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.1
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.1 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2023-10-24 14:52:55 -04:00
Michael Klishin 24fa70a0ee
Merge pull request #9772 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.1
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.1 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2023-10-24 14:52:40 -04:00
Michael Klishin e99b9bc364
Merge pull request #9773 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.1
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.1 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2023-10-24 14:52:34 -04:00
dependabot[bot] dd09327c4a
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 18:49:17 +00:00
dependabot[bot] 7f45bb1949
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 18:27:56 +00:00
dependabot[bot] feaeea2f2e
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 18:22:19 +00:00
dependabot[bot] ab46fb3f68
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 18:18:15 +00:00
Luke Bakken 314f5b633c Add a warning message that probably nobody will ever see 😆 2023-10-24 11:16:05 -07:00
Luke Bakken c2f43dc6bd Handle `{error, not_found}` case when recovering a binding
A customer could not recover a vhost due to the following error:

```
[error] <0.32570.2> Unable to recover vhost <<"/">> data. Reason {badmatch,{error,not_found}}
[error] <0.32570.2>  Stacktrace [{rabbit_binding,recover_semi_durable_route,3,
[error] <0.32570.2>                              [{file,"rabbit_binding.erl"},{line,113}]},
[error] <0.32570.2>              {rabbit_binding,'-recover/2-lc$^1/1-1-',3,
[error] <0.32570.2>                              [{file,"rabbit_binding.erl"},{line,103}]},
[error] <0.32570.2>              {rabbit_binding,recover,2,
[error] <0.32570.2>                              [{file,"rabbit_binding.erl"},{line,104}]},
```

Reference: https://vmware.slack.com/archives/C0RDGG81Z/p1698140367947859
2023-10-24 11:16:05 -07:00
Michael Klishin 83bfce891c
Merge pull request #9768 from rabbitmq/driveby-opt
Optimise rabbit_registry:binary_to_type/1
2023-10-24 12:32:50 -04:00
Jean-Sébastien Pédron 5f94cf1583
rabbit_deprecated_features: No need to check for HA polices if Khepri is enabled
[Why]
Khepri depends on the fact that classic queue mirroring is turned off
(i.e. the `classic_queue_mirroring` deprecated feature is denied or
removed).

Therefore, there is no need to query the database for something that
won't be there anyway.

[How]
We simply return `false` if Khepri is enabled.
2023-10-24 11:36:43 +02:00
Jean-Sébastien Pédron 891ba1a8c4
rabbit_deprecated_features: Improve reliability of the `classic_queue_mirroring` callback
[Why]
The callback wants to query the `rabbit_runtime_parameters` Mnesia table
to see if there HA policies configured. However this table may exist but
may be unavailable. This is the case in a cluster if the node running
the callback has to wait for another cluster member before Mnesia tables
can be queried or updated.

[How]
Once we verified the `rabbit_runtime_parameters` Mnesia table exists, we
wait for its availability before we query it. `rabbit_table:wait/2` will
throw an exception if the wait times out.

In particular this avoids an infinite loop in
`mnesia_to_khepri:handle_fallback()` because it relies on the
availability of the table too to determine if the table is being
migrated or not.
2023-10-24 11:36:38 +02:00
Karl Nilsson e7b9a9e40f Optimise rabbit_registry:binary_to_type/1
By not roundtripping binary to list before converting to atom.
2023-10-24 09:41:17 +01:00
Jean-Sébastien Pédron f866f3397a
rabbit_deprecated_features: Use `is_feature_used` callback only if not required
[Why]
The `is_feature_used` callback is used to determine if a deprecated
feature can really be denied. Therefore it only makes sense for
deprecated features in their `permitted_by_default` and
`denied_by_default` phases.

When a deprecated feature enters the `disconnected` or `removed` phases,
the code being the feature should be gone. Therefore, there is no point
in checking if it is used.

[How]
We get the stability derived from the deprecated feature phase before we
actually run the callback.

While here, if the callback returns an error, we treat it as if it
returned that the feature is used.

As a reminder, a node will refuse to start if a deprecated feature is
denied but the feature is used. This is a slight change compared to the
initial goal of the deprecated features subsystem. Indeed, the goal was
to allow users experiment with the future behavior of RabbitMQ. However,
a future node would probably still start even if there were left-overs
from a removed feature. However if a `permitted_by_default` or
`denied_by_default` deprecated feature is denied, the node would refuse
to start. We see that as a strong way to communicate the user that an
action is required from them.
2023-10-24 10:14:50 +02:00
Michael Klishin 2316579c40
AMQP 1.0 Erlang client: integrate credentials_obfuscation
gen_statem:format_status/1 did not make any difference
for logged crash reports, so we reach for the solution
we already use in multiple places.

References #9763.
2023-10-24 01:31:09 -04:00
Diana Parra Corbacho 07196e297b Reduce the number of metrics served by GET /api/queues
Introduce GET /api/queues/detailed endpoint

Just removed garbage_collection, idle_since and any 'null' value

/api/queues with 10k classic queues returns 7.4MB of data
/api/queues/detailed with 10k classic queues returns 11MB of data

This sits behind a new feature flag, required to collect data from
all nodes: detailed_queues_endpoint
2023-10-23 19:49:37 -04:00
Michael Klishin 55bd90c0e4
Merge pull request #9187 from rabbitmq/update-secret
Update secret on the stream protocol
2023-10-23 19:46:52 -04:00
Michael Klishin 0be8111b8e
Merge pull request #9763 from rabbitmq/mk-amqp10-client-format-status
AMQP 1.0 client connection: implement format_status/1
2023-10-23 19:42:31 -04:00
Michael Klishin eea4a8309d
Remove a few temporary exports 2023-10-23 16:02:17 -04:00
Michael Klishin 23e7639ae3
AMQP 1.0 client connection: implement format_status/1
To scrub two sensitive state values. Note that this callback
is used/respect by some tools (via 'sys:get_status/1') but
that won't be enough in all cases (namely a process crash logger
would still log the original state).
2023-10-23 15:59:54 -04:00
David Ansari 512aaa5912 Reduce memory with many SSL connections
By default, hibernate the SSL connection after 6 seconds, reducing its memory footprint.
This reduces memory usage of RabbitMQ by multiple GBs with thousands of
idle SSL connections.

This commit chooses a default value of 6 seconds because that hibernate_after
value is currently hard coded for rabbit_writer.
rabbit_mqtt_reader uses 1 second, rabbit_channel uses 1 - 10 seconds.

This value can be overriden by advanced.config, similar to:
```
[{rabbit, [
    {ssl_options, [
        {hibernate_after, 30000},
        {keyfile, "/etc/.../server_key.pem"},
        {certfile, "/etc/.../server_certificate.pem"},
        {cacertfile, "/etc/.../ca_certificate.pem"},
        {verify,verify_none}
    ]}
]}].
```

See https://www.erlang.org/doc/man/ssl.html#type-hibernate_after
```
When an integer-value is specified, TLS/DTLS-connection goes into
hibernation after the specified number of milliseconds of inactivity,
thus reducing its memory footprint. When undefined is specified
(this is the default), the process never goes into hibernation.
```

Relates
https://github.com/rabbitmq/rabbitmq-server/discussions/5346
https://groups.google.com/g/rabbitmq-users/c/be8qtkkpg5s/m/dHUa-Lh2DwAJ
2023-10-23 13:14:42 +00:00
dependabot[bot] 3405e53e53
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.1.4 to 3.1.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.4...v3.1.5)

---
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>
2023-10-19 18:16:33 +00:00
dependabot[bot] 348629401c
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.1.4 to 3.1.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.4...v3.1.5)

---
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>
2023-10-19 18:13:50 +00:00
Michael Klishin e87a3995c5
Closes #9733 2023-10-19 11:27:14 -04:00
Rin Kuryloski 231465f35e Use rules_erlang 3.13.1
This version of rules_erlang adds coverage support

Bazel has sort of standardized on lcov for coverage, so that is what
we use.

Example:
1. `bazel coverage //deps/rabbit:eunit -t-`
2. `genhtml --output genhtml "$(bazel info
output_path)/_coverage/_coverage_report.dat"`
3. `open genhtml/index.html`

Multiple tests can be run with results aggregated, i.e. `bazel
coverage //deps/rabbit:all -t-`

Running coverage with RBE has a lot of caveats,
https://bazel.build/configure/coverage#remote-execution, so the above
commands won't work as is with RBE.
2023-10-17 11:22:36 -04:00
Karl Nilsson 1ba62a90f2 Actually nack when using 'Nack message requeue true'
Option in mgmt UI.
2023-10-17 14:12:09 +01:00
Jean-Sébastien Pédron f95ccafb5e
rabbit_db: Copy feature states early when joining a cluster
[Why]
So far, the feature states were copied from the cluster after the actual
join. However, the join may have reloaded the feature flags registry,
using the previous on-disk record, defeating the purpose of copying the
cluster's states.

This was done in this order to have a simpler error handling.

[How]
This time, we copy the remote cluster's feature states just after the
reset.

If the join fails, we reset the feature flags again, including the
on-disk states.
2023-10-17 09:38:12 +02:00
Jean-Sébastien Pédron 59cddde69b
rabbit_feature_flags: Add `reset/0` which also deletes the states on disk
[Why]
Sometimes, we need to reset the in-memory registry only, like when we
restart the `rabbit` application, not the whole Erlang node. However,
sometimes, we also need to delete the feature states on disk. This is
the case when a node joins a cluster.

[How]
We expose a new `reset/0` function which covers both the in-memory and
on-disk states.

This will be used in a follow-up commit to correctly reset the feature
flags states in `rabbit_db_cluster:join/2`.
2023-10-17 09:38:12 +02:00
Jean-Sébastien Pédron 86e5431c74
rabbit_feature_flags: Remove `feature_flags` file as part of a reset
[Why]
`reset_registry/0` reset the in-memory states so far, but left the
on-disk record. This is inconsistent.

[How]
After resetting the in-memory states, we remove the file on disk.
2023-10-17 09:38:12 +02:00
Jean-Sébastien Pédron a98637e248
rabbit_node_monitor: Don't monitor partitioned nodes when using Khepri
[Why]
This relies on Mnesia and is only useful when using Mnesia. Indeed,
there is no partition handling when Khepri is used.
2023-10-17 09:38:12 +02:00
Jean-Sébastien Pédron f571b86692
rabbit_khepri: Remove Mnesia files after migration
[Why]
When a Khepri-based node joins a Mnesia-based cluster, it is reset and
switches back from Khepri to Mnesia. If there are Mnesia files left in
its data directory, Mnesia will restart with stale/incorrect data and
the operation will fail.

After a migration to Khepri, we need to make sure there is no stale
Mnesia files.

[How]
We use `rabbit_mnesia` to query the Mnesia files and delete them.
2023-10-17 09:38:12 +02:00
Jean-Sébastien Pédron cfdf9dc94e
rabbit_khepri: Fix incorrect log level
This is probably the result of a copy-paste.
2023-10-17 09:38:07 +02:00
Michael Klishin 6009a4973f
Merge pull request #9708 from rabbitmq/mk-limit-max-http-api-payload-size
Introduce a configurable limit to HTTP API request body size
2023-10-16 21:49:50 -04:00
Michael Klishin 087794dded
HTTP API: adapt publishing tests
to take the newly introduced 10 MiB default body size limit
into account.
2023-10-16 19:14:16 -04:00
Michael Klishin 46a566b224
Merge pull request #9706 from rabbitmq/rin/fix-bazel-make-divergence
Fixup bazel/make divergence
2023-10-16 17:31:29 -04:00
Rin Kuryloski 887f215545 Add mnesia to LOCAL_DEPS in rabbitmq_jms_topic_exchange
it is present in the Bazel build, and if removed from the bazel side
causes :dialyze to fail
2023-10-16 18:10:50 +02:00
Rin Kuryloski 8404f0b478 Add osiris to rabbitmq_stream_management deps in Make 2023-10-16 17:38:50 +02:00
Rin Kuryloski 558b8d03f4 Remove mnesia from rabbitmq_management_agent deps in bazel
it's not required and is not listed in the LOCAL_DEPS in the Makefile
2023-10-16 17:37:54 +02:00
Karl Nilsson d7a4bf377a AMQP 1.0 tests - declare correct stream names for each test
Else tests can't be run individually, only as a group.
2023-10-16 16:17:36 +01:00
Rin Kuryloski 3e8101536a Remove mnesia from rabbitmq_management_agent deps in bazel
it's not required and is not listed in the LOCAL_DEPS in the Makefile
2023-10-16 16:34:26 +02:00
Rin Kuryloski 513e2668c5 Add khepri to rabbitmq_recent_history_exchange deps 2023-10-16 16:22:11 +02:00
Rin Kuryloski e4eaf0b806 Add khepri to rabbitmq_jms_topic_exchange deps 2023-10-16 16:21:23 +02:00
Rin Kuryloski ac1e6cc1cb Add khepri dep to rabbitmq_consistent_hash_exchange in Make 2023-10-16 16:20:18 +02:00
Michael Klishin c6d0382be4
Reduce default HTTP API request body size limit to 10 MiB
per discussion with the team.

It should be enough to accomodate a definition file with about
100K queues.
2023-10-16 06:48:23 -04:00
Michael Klishin b7b3514bb1
Introduce HTTP request body limit for definition uploads
The default is 20 MiB, which is enough to upload
a definition file with 200K queues, a few virtual host
and a few users. In other words, it should accomodate
a lot of environments.
2023-10-14 06:11:01 -04:00
Karl Nilsson 2494dbf678 Osiris v1.6.9
This contains a fix for a situation where a replica may not discover
the current commit offset until the next entry is written to the
stream.

Should help with a frequent flake in rabbit_stream_queue_SUITE:add_replicas
2023-10-13 12:01:57 +01:00
Michael Klishin d4db7191ee
Merge pull request #9678 from rabbitmq/osiris_v1.6.8
Osiris v1.6.8
2023-10-11 18:36:46 -04:00
Jean-Sébastien Pédron a21b60d8a4
rabbit_feature_flags: Write one feature name per line in `feature_flags`
[Why]
The `feature_flags` file is used to record the states of feature flags.
The content is a formatted sorted Erlang list.

This works just fine, but reading it for a human (a developer) is more
difficult than if we had a single feature name per line. It is also more
difficult to use diff(1) on the file.

This patch ensures that the Erlang list is formatted with an item per
text line.

[How]
The format string enforces an line width of 1 column. The terms are not
truncated obviously, but the lines are wrapped immediately after an
item.
2023-10-11 17:24:17 +02:00
Karl Nilsson 28e196f6f9 stream queue log resolved local pid 2023-10-11 15:54:21 +01:00
Karl Nilsson 89be37f403 Osiris v1.6.8
This osiris release contains optimisations and bug fixes:

* Various index scanning operations have been substantially improved
  resulting in up to 10x improvement for certain cases.
* A bug which meant stream replication listener would fail if the
  TLS version was limited to `tlsv1.3` has been fixed.
* A bug where the log may be incorrectly truncated when filters are
  used has been fixed.
* Startup handles one more case where a file has been corrupted after
  an unclean shutdown.
2023-10-11 11:19:55 +01:00
GitHub 4328cbb0c8 bazel run gazelle 2023-10-11 04:03:50 +00:00
Michael Klishin 8e7e8f9127
Merge branch 'main' into issue-9437-queue-storage-version 2023-10-10 15:03:50 -04:00
Michael Klishin 5208e7d74e
Merge pull request #9669 from rabbitmq/mk-rabbitmqctl-accept-password-hashes
CLI: support for pre-hashed passwords
2023-10-10 11:55:11 -04:00
Arnaud Cogoluègnes c04d324b9f
Fix list_stream_consumer_groups validation
It had been broken in a refactoring to squash
dialyzer warnings.
2023-10-10 16:44:05 +02:00
Arnaud Cogoluègnes d47a987c98
Merge pull request #9642 from rabbitmq/stream-list-tracking-info
Add command and REST endpoint to list stream tracking info
2023-10-10 16:29:21 +02:00
Michael Klishin 6d3f008336
CLI: mix format 2023-10-10 09:24:29 -04:00
Jean-Sébastien Pédron 47ab26fb66
rabbit_feature_flags: Fix typo in docs 2023-10-10 14:46:01 +02:00
Arnaud Cogoluègnes 65d381ef6c
Polish list_stream_tracking
Correct output when there is no line, fix usage, formatting.
2023-10-10 10:57:48 +02:00
Arnaud Cogoluègnes 36027a2713
Add source file to Bazel 2023-10-10 09:14:25 +02:00
Arnaud Cogoluègnes 94115f8a8b
Add /stream/:vhost/:stream/tracking REST endpoint 2023-10-10 09:14:24 +02:00
Arnaud Cogoluègnes b541be658e
Use tracking_value for column header 2023-10-10 09:14:24 +02:00
Arnaud Cogoluègnes dc5a63dfbd
Fix command file name 2023-10-10 09:14:24 +02:00
Arnaud Cogoluègnes cfa7c26760
Add command to Bazel configuration 2023-10-10 09:14:23 +02:00
Arnaud Cogoluègnes 048a4998ed
Add list_stream_tracking 2023-10-10 09:14:23 +02:00
Michael Klishin 17fded2e12
CLI: support for pre-hashed passwords
Providing a pre-hashed and salted password is
not significantly more secure but satisfies those
who cannot pass clear text passwords on the command
line for regulatory reasons.

Note that the optimal way of seeding users is still
definition import on node boot, not scripting with
CLI tools.

Closes #9166
2023-10-09 23:52:34 -04:00
Michael Klishin 856f56ea0b
ctl: add support for providing pre-hashed passwords (WIP) 2023-10-09 23:52:34 -04:00
Ayanda Dube 6e5ad7d59e oops, fix parameter ordering 2023-10-09 14:56:10 +01:00
Ayanda Dube bc1af7c0c2 announce partition handling mechanism in node monitor start-up log 2023-10-09 14:02:51 +01:00
Ayanda Dube 7ce9d8688a prevent multiple node disconnects in unstable networks
when nodes are already disconnected, thus preventing
application controller timeouts and node monitor terminations,
which in some cases fails to receover completely.
2023-10-09 13:27:59 +01:00
Péter Gömöri f3410db503 Web-MQTT: don't call FHC when connection terminates early
When the Web-MQTT connection terminates early because of no supported
subprotocol, `terminate/3` called fhc release although no fhc obtain was
called yet. This was the case even when `use_file_handle_cache` was false,
because `#state.should_use_fhc` was not initialized.

Fixing this avoids the below harmless warning

```
[debug] error updating ets counter <0.1224.0> in table #Ref<0.2797411137.1366163457.189876>:
[{ets, update_counter,
  [#Ref<0.2797411137.1366163457.189876>,
   <0.1224.0>, {5, -1}],
   ...
[warning] FHC: failed to update counter 'obtained_socket', client pid: <0.1224.0>
```
2023-10-06 07:22:01 +02:00
Michael Klishin 0ed2c1ba7b
Merge pull request #9651 from rabbitmq/gazelle-main
bazel run gazelle
2023-10-06 00:17:47 -04:00
GitHub e5469e454d bazel run gazelle 2023-10-06 04:03:31 +00:00
Michael Klishin aa0c52093f Add length limit overflow behavior to supported features in the UI 2023-10-05 21:17:56 -04:00
Karl Nilsson 8db5316b87 Stream queue: treat discard and return like settle
Currently these are not allowed for use with stream queues
which is a bit too strict. Some client impl will automatically
nack or reject messages that are pending when an application
requests to stop consuming. Treating all message outcomes the same
makes as much sense as not to.
2023-10-05 20:30:30 -04:00
Karl Nilsson 6e4f619f90 Improve rabbit_stream_queue:get_local_pid/1
By checking if the in state cached pid is actually still alive
and if not fall back to a local / consistent query.
2023-10-05 20:30:30 -04:00
Alex Valiushko 2d569f1701 New quorum queue members join as temporary non-voters
Because both `add_member` and `grow` default to Membership status `promotable`,
new members will have to catch up before they are considered cluster members.
This can be overridden with either `voter` or (permanent `non_voter` statuses.
The latter one is useless without additional tooling so kept undocumented.

- non-voters do not affect quorum size for election purposes
- `observer_cli` reports their status with lowercase 'f'
- `rabbitmq-queues check_if_node_is_quorum_critical` takes voter status into
account
2023-10-05 20:30:30 -04:00
David Ansari d56ff59e61 Fix MQTT Topic Alias type spec 2023-10-05 20:30:30 -04:00
Michael Klishin 385db409db
Merge pull request #9644 from rabbitmq/stream-queue-allow-reject-nack
Stream queue: treat discard and return like settle
2023-10-05 12:41:15 -04:00
Michael Klishin a32b3085f7
Merge pull request #9640 from rabbitmq/streams-get-local-pid-improvement
Improve rabbit_stream_queue:get_local_pid/1
2023-10-05 12:40:35 -04:00
Michael Klishin 4824feacc7
Merge pull request #9162 from amazon-mq/nonvoters
Add new QQ members as non-voters
2023-10-05 12:39:37 -04:00
David Ansari 3501a00632 Fix MQTT Topic Alias type spec 2023-10-05 18:11:26 +02:00
Karl Nilsson d6900be8a0 Stream queue: treat discard and return like settle
Currently these are not allowed for use with stream queues
which is a bit too strict. Some client impl will automatically
nack or reject messages that are pending when an application
requests to stop consuming. Treating all message outcomes the same
makes as much sense as not to.
2023-10-05 16:19:28 +01:00
Karl Nilsson 189dd103d9 Improve rabbit_stream_queue:get_local_pid/1
By checking if the in state cached pid is actually still alive
and if not fall back to a local / consistent query.
2023-10-05 12:22:52 +01:00
Simon Unge cffc77d396 Add overflow as operpolicy 2023-10-05 11:22:51 +00:00
Alex Valiushko 4df3080fa1 New quorum queue members join as temporary non-voters
Because both `add_member` and `grow` default to Membership status `promotable`,
new members will have to catch up before they are considered cluster members.
This can be overridden with either `voter` or (permanent `non_voter` statuses.
The latter one is useless without additional tooling so kept undocumented.

- non-voters do not affect quorum size for election purposes
- `observer_cli` reports their status with lowercase 'f'
- `rabbitmq-queues check_if_node_is_quorum_critical` takes voter status into
account
2023-10-04 11:14:07 -07:00
Diana Parra Corbacho c1a6e5b3e5 Return storage_version as top-level key in queue objects
A previous PR removed backing_queue_status as it is mostly unused,
but classic queue version is still useful. This PR returns version
as a top-level key in queue objects.
2023-10-04 09:29:01 +02:00
Karl Nilsson 46602311ef Increase the erpc timeout when starting a QQ cluster.
The previous timeout was too low and could time out before the
start cluster operation had completed. This would result in
the mnesia record being deleted whilst member might still be active.

60s should be plenty in most cases. Hopefully...
2023-10-03 16:22:45 +01:00
markus812498 cc8b7d780a added spaces after end of sentence to ensure words are separated by space in logs. 2023-10-02 15:52:03 +13:00
Arnaud Cogoluègnes 944b34e4e0 Add pid and node columns to list_stream_connections
Fixes #9555
2023-09-30 14:59:25 -04:00
Arnaud Cogoluègnes db65caa91f Add node column to list_stream_publishers/consumers
Fixes #9582
2023-09-30 14:59:25 -04:00
Michael Klishin 928cdfb207
Merge pull request #9587 from rabbitmq/dependabot/maven/deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests/main/com.diffplug.spotless-spotless-maven-plugin-2.40.0
Bump com.diffplug.spotless:spotless-maven-plugin from 2.39.0 to 2.40.0 in /deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests
2023-09-29 16:20:52 -04:00
dependabot[bot] 83aa17cd7f
Bump com.diffplug.spotless:spotless-maven-plugin
Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.39.0 to 2.40.0.
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.39.0...lib/2.40.0)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 18:58:01 +00:00
dependabot[bot] 7766b662c4
Bump com.diffplug.spotless:spotless-maven-plugin
Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.39.0 to 2.40.0.
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.39.0...lib/2.40.0)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-29 18:56:41 +00:00
Rin Kuryloski c5850751ce Make looking_glass an optional dep for deps/rabbit
https://github.com/rabbitmq/rules_erlang/tree/main/gazelle#directives
2023-09-29 17:21:54 +02:00
Michael Klishin 87d15c6a57 bazel run gazelle 2023-09-29 11:13:20 -04:00