Skip to content

Commit 3b61b25

Browse files
Merge pull request rabbitmq#38 from cloudamqp/support_3_13
Make plugin compatible with 3.13
2 parents 6c6b7e9 + 7cfc482 commit 3b61b25

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

.bazelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
build --enable_bzlmod
2-
# build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/dev/
2+
3+
build --registry=https://bcr.bazel.build/
4+
build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/erlang-packages/
35

46
build --incompatible_strict_action_env
57
build --local_test_jobs=1

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module(
22
name = "rabbitmq_rtopic_exchange",
3-
version = "3.11.4",
3+
version = "3.13.0",
44
)
55

66
bazel_dep(

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
PROJECT = rabbitmq_rtopic_exchange
22
PROJECT_DESCRIPTION = Reverse Topic Exchange Type
3-
RABBITMQ_VERSION ?= v3.11.x
3+
RABBITMQ_VERSION ?= v3.13.x
4+
current_rmq_ref = $(RABBITMQ_VERSION)
45

56
define PROJECT_APP_EXTRA_KEYS
6-
{broker_version_requirements, ["3.11.0"]}
7+
{broker_version_requirements, ["3.13.0"]}
78
endef
89

910
DEPS = rabbit_common rabbit

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ The exchange type used when declaring an exchange is `x-rtopic`.
5151

5252
## Supported RabbitMQ Versions
5353

54-
The most recent release of this plugin targets RabbitMQ 3.12.x.
54+
The most recent release of this plugin targets RabbitMQ 3.13.x.
55+
56+
This plugin requires Mnesia and does not work with Khepri!
5557

5658
## Supported Erlang/OTP Versions
5759

58-
This plugin [requires Erlang 25.0 or later versions](https://www.rabbitmq.com/which-erlang.html), same as RabbitMQ 3.12.x.
60+
This plugin [requires Erlang 26.0 or later versions](https://www.rabbitmq.com/which-erlang.html), same as RabbitMQ 3.13.x.
5961

6062
## Installation and Binary Builds
6163

@@ -116,7 +118,7 @@ If you have the needs for routing `"a0.#.c0.d0.#.f0.#"` then again, with a small
116118

117119
1. Update `broker_version_requirements` in `helpers.bzl` & `Makefile` (Optional)
118120
1. Update the plugin version in `MODULE.bazel`
119-
1. Push a tag (i.e. `v3.12.0`) with the matching version
121+
1. Push a tag (i.e. `v3.13.0`) with the matching version
120122
1. Allow the Release workflow to run and create a draft release
121123
1. Review and publish the release
122124

helpers.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("@rules_erlang//:ct.bzl", "ct_test")
22

3-
BROKER_VERSION_REQUIREMENTS_TERM = """{broker_version_requirements, ["3.11.0"]}"""
3+
BROKER_VERSION_REQUIREMENTS_TERM = """{broker_version_requirements, ["3.13.0"]}"""
44

55
def rabbitmq_suite(
66
name = None,

src/rabbit_exchange_type_rtopic.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
-behaviour(rabbit_exchange_type).
1818

19-
-export([description/0, serialise_events/0, route/2]).
19+
-export([description/0, serialise_events/0, route/3]).
2020
-export([validate/1, validate_binding/2,
2121
create/2, delete/2, policy_changed/2, add_binding/3,
2222
remove_bindings/3, assert_args_equivalence/2]).
@@ -58,8 +58,8 @@ description() ->
5858
serialise_events() -> false.
5959

6060
%% NB: This may return duplicate results in some situations (that's ok)
61-
route(#exchange{name = X},
62-
#delivery{message = #basic_message{routing_keys = Routes}}) ->
61+
route(#exchange{name = X}, Msg, _Opts) ->
62+
Routes = mc:routing_keys(Msg),
6363
lists:append([begin
6464
Words = split_topic_key(RKey),
6565
mnesia:async_dirty(fun trie_match/2, [X, Words])

0 commit comments

Comments
 (0)