Commit Graph

57092 Commits

Author SHA1 Message Date
Michael Davis fd22440d15
rabbit_exchange_decorator: Propagate errors in registry callbacks
rabbit_exchange_decorator:maybe_recover/1 is not yet fallible since it
hard matches on success in rabbit_exchange:update_decorators/2 but
this change prepares these callbacks to handle errors for a later change
that bubbles up those errors to callers.
2024-07-18 12:57:53 -04:00
Michael Davis 7d3dbb8013
Handle potential {error,_} returns from rabbit_registry (un)register
This mostly fixes dialyzer warnings since rabbit_registry:register/3
and rabbit_registry:unregister/2 may now return errors.
2024-07-18 12:57:39 -04:00
Michael Davis c0b163aacc
Add {error,_} returns to rabbit_registry_class callbacks 2024-07-17 16:56:22 -04:00
Michael Davis ce2183504d
rabbit_registry: Allow register/unregister to fail, return {error,_} 2024-07-17 16:56:22 -04:00
Michael Davis 178f5a94f1
rabbit_registry: Remove conditional register/unregister
Since exchange decorators were moved onto the exchange record way back
in 6fa8df03f5 these ETS records haven't
been read. In fact the `exchange_decorator_route` atom's only references
were in these deleted lines since that commit.
2024-07-17 16:56:22 -04:00
Michael Davis b20f0018ec
Use rabbit_registry:(un)register_many helpers in rabbit_registry callers 2024-07-17 16:56:22 -04:00
Michael Davis c67500f4ce
rabbit_registry: Add register_many/2 and unregister_many/1 helpers 2024-07-17 16:56:21 -04:00
Michael Davis 52694a3b9b
Move rabbit_db_queue:for_each_while_ok/2 helper to rabbit_misc 2024-07-17 11:36:10 -04:00
Michael Davis 6ce5825db5
rabbit_registry: Move specs to function definitions 2024-07-17 11:34:54 -04:00
Arnaud Cogoluègnes 58d835ba5d
MQTT auth_SUITE: terminate setup process
Configuring the mock authentication backend blocks
and generates an error in the test process when the
broker goes down. The error report makes the test fail
in some environments.

The process where the setup takes place must stay up
otherwise the ETS table used will go away.

This commit makes sure the broker-side authentication backend
setup returns at the end of the test. This way the calling
process terminates in a normal way.
2024-07-17 15:36:20 +02:00
Michael Klishin 2c96bccc08 4.0 release notes: one more typo 2024-07-16 23:05:53 -04:00
Michael Klishin 249fb85330
Merge pull request #11732 from johanrhodin/patch-13
fix typos
2024-07-16 17:52:20 -04:00
Johan Rhodin c86a0be5c6
fix typos 2024-07-16 16:13:16 -05:00
Michael Klishin 2c753f66b1 Update 4.0.0 release notes 2024-07-16 14:16:01 -04:00
Karl Nilsson 2679649ac5
Merge pull request #11698 from rabbitmq/ra-2.13.0
Ra 2.13.1
2024-07-16 15:22:44 +01:00
Michael Klishin 82d6709f91
Merge pull request #11724 from rabbitmq/gazelle-main
bazel run gazelle
2024-07-16 06:46:01 -04:00
GitHub c3beec2d32 bazel run gazelle 2024-07-16 04:02:25 +00:00
Michael Klishin 69b6ed4a67
Merge pull request #11720 from SimonUnge/empty_body_json_decode
Handle empty HTTP body in response from AWS JSON
2024-07-15 19:40:32 -04:00
Simon Unge c32e0d647f Handle empty HTTP body in response (as some AWS 200 reponse will have an empty body for some reason) 2024-07-15 22:59:20 +00:00
Michael Klishin ff5a324564
Merge pull request #11716 from rabbitmq/cmq-cleanup
CMQ cleanup
2024-07-15 13:39:09 -04:00
Michael Klishin 5346339655 Squash two more deprecated CMQ-related CLI command warnings 2024-07-15 12:38:01 -04:00
Michael Klishin 8de26fbc03 Fix two warnings in a deprecated CMQ-related CLI command 2024-07-15 12:38:01 -04:00
Michal Kuratczyk 9debca24d8 Remove HA policy example from OpenStack script 2024-07-15 12:38:01 -04:00
Michal Kuratczyk e1b649c0c6 check_if_node_is_mirror_sync_critical is no-op
Make `check_if_node_is_mirror_sync_critical` a no-op
with a deprecation warning. Since this command is commonly used
as part of the node shutdown process (eg. by Cluster Operator),
making it a no-op instead of removing completly will make the
transition to 4.0 easier for users.
2024-07-15 12:38:01 -04:00
Michal Kuratczyk 6b1377163d Remove sync_queue and cancel_sync_queue from man page 2024-07-15 12:38:01 -04:00
Michael Klishin c34faf9e12
Merge pull request #11423 from rabbitmq/bump-oidc-client-ts
OAuth 2, breaking change: upgrade oidc-client-ts library to a new major
2024-07-15 12:11:47 -04:00
Karl Nilsson c0c6029938 Ra 2.13.1
This release contains improvements to the checkpointing feature
needed for quorum queues v4 and the following fixes:

* Add read to file:open/2 options in ra_lib:sync_file/1
* Emit the new local_query tuple only if query options are set
* bug fixes for checkpoints
2024-07-15 15:08:35 +01:00
Karl Nilsson 131379a483 mc: increase utf8 scanning limit for longstr conversions.
The AMQP 0.9.1 longstr type is problematic as it can contain arbitrary
binary data but is typically used for utf8 by users.

The current conversion into AMQP avoids scanning arbitrarily large
longstr to see if they only contain valid utf8 by treating all
longstr data longer than 255 bytes as binary. This is in hindsight
too strict and thus this commit increases the scanning limit to
4096 bytes - enough to cover the vast majority of AMQP 0.9.1 header
values.

This change also conversts the AMQP binary types into longstr to
ensure that existing data (held in streams for example) is converted
to an AMQP 0.9.1 type most likely what the user intended.
2024-07-15 14:07:19 +02:00
Marcial Rosales ee52464ade Merge changes from main 2024-07-15 02:33:27 -04:00
Marcial Rosales 5b6d0ecb7e Do not test against UAA 2024-07-15 02:33:27 -04:00
Marcial Rosales b110be5cb7 Replace oidc-client-ts dependencies 2024-07-15 02:33:27 -04:00
Michael Klishin c902bfc853 Make it clear that 4.0.0 will go through betas and RCs first 2024-07-15 01:34:44 -04:00
Michael Klishin fe4087f72e
Merge pull request #11713 from rabbitmq/mk-4.0.0-release-notes
Initial (very brief) 4.0.0 release notes
2024-07-15 01:08:11 -04:00
Michael Klishin fca9d9131c Initial (very brief) 4.0.0 release notes 2024-07-15 01:07:43 -04:00
Michael Klishin aeeb990e57
Merge pull request #11709 from rabbitmq/gazelle-main
bazel run gazelle
2024-07-13 01:49:50 -04:00
Michael Klishin 6f67a85ad9
Merge pull request #11705 from rabbitmq/amqp-consumer-priority
Support consumer priority in AMQP
2024-07-13 00:11:42 -04:00
GitHub e74ecff203 bazel run gazelle 2024-07-13 04:02:17 +00:00
Michael Klishin bd5e9fa2ac
Merge pull request #11700 from rabbitmq/md/khepri/projections-ets-try-catch
Use 'try'/'catch' rather than 'ets:whereis/1' for Khepri projections
2024-07-12 17:09:02 -04:00
David Ansari e6587c6e45 Support consumer priority in AMQP
Arguments
* `rabbitmq:stream-offset-spec`,
* `rabbitmq:stream-filter`,
* `rabbitmq:stream-match-unfiltered`
are set in the `filter` field of the `Source`.
This makes sense for these consumer arguments because:
> A filter acts as a function on a message which returns a boolean result
> indicating whether the message can pass through that filter or not.

Consumer priority is not really such a predicate.
Therefore, it makes more sense to set consumer priority in the
`properties` field of the `Attach` frame.

We call the key `rabbitmq:priority` which maps to consumer argument
`x-priority`.

While AMQP 0.9.1 consumers are allowed to set any integer data
type for the priority level, this commit decides to enforce an `int`
value (range -(2^31) to 2^31 - 1 inclusive).
Consumer priority levels outside of this range are not needed in
practice.
2024-07-12 20:31:01 +02:00
Michael Klishin f20f5beece
Merge pull request #11701 from rabbitmq/consumer-args
Fix queue type consumer arguments
2024-07-12 12:52:56 -04:00
David Ansari 3863db3989 Fix queue type consumer arguments
see https://www.rabbitmq.com/blog/2023/10/24/stream-filtering-internals#bonus-stream-filtering-on-amqp

`x-credit` was used by the 3.13 AMQP 1.0 plugin
2024-07-12 16:58:40 +02:00
Michael Davis 9f255db90f
Use 'try'/'catch' rather than 'ets:whereis/1' for Khepri projections
`ets:whereis/1` adds some overhead - it's two ETS calls rather than one
when `ets:whereis/1` returns a table identifier. It's also not atomic:
the table could disappear between `ets:whereis/1` calls and the call to
read data from a projection. We replace all `ets:whereis/1` calls on
projection tables with `try`/`catch` and return default values when we
catch the `badarg` `error` which ETS emits when passed a non-existing
table name.

One special case though is `ets:info/2` which returns `undefined` when
passed a non-existing table names. That block is refactored to use a
`case` instead.
2024-07-12 10:35:29 -04:00
David Ansari d4ea90d777 Simplify
Protect only `rabbit_mqtt_processor:handle_queue_event/2` since only
that call might throw a `{send_failed, Reaso}`.
2024-07-12 14:40:35 +02:00
Michal Kuratczyk f398892bda
Deprecate queue-master-locator (#11565)
* Deprecate queue-master-locator

This should not be a breaking change - all validation should still pass
* CQs can now use `queue-leader-locator`
* `queue-leader-locator` takes precedence over `queue-master-locator` if both are used
* regardless of which name is used, effectively there are only two  values: `client-local` (default) or `balanced`
* other values (`min-masters`, `random`, `least-leaders`) are mapped to `balanced`
* Management UI no longer shows `master-locator` fields when declaring a queue/policy, but such arguments can still be used manually (unless not permitted)
* exclusive queues are always declared locally, as before
2024-07-12 13:22:55 +02:00
Michael Klishin 70eb413a0a
Merge pull request #11686 from rabbitmq/lukebakken/remove-elixir-warning
Fix elixir warning on build
2024-07-11 22:30:39 -04:00
Luke Bakken 3733ebc7d6 Fix elixir warning on build
This is the warning:
```
warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
```
2024-07-11 22:15:33 -04:00
Michael Klishin 6eebb20581 gazelle-scheduled.yaml: Drop 3.11.x and 3.10.x, add 3.13.x and 4.0.x 2024-07-11 22:13:38 -04:00
Michael Klishin 4f4e62cf1a dependabot.yaml: drop 3.11.x, add 3.13.x and 4.0.x 2024-07-11 22:11:52 -04:00
Michael Klishin 46b7578798
Merge pull request #11689 from rabbitmq/mk-revert-11559
Revert #11559
2024-07-11 21:36:45 -04:00
Michael Klishin 0700e1cdc4 Revert "Provide per-exchange/queue metrics w/out channelID"
This reverts commit 3ed2e30e3a.
2024-07-11 21:34:52 -04:00