Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build --enable_bzlmod
# build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/dev/

build --registry=https://bcr.bazel.build/
build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/erlang-packages/

build --incompatible_strict_action_env
build --local_test_jobs=1
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "rabbitmq_rtopic_exchange",
version = "3.11.4",
version = "3.13.0",
)

bazel_dep(
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
PROJECT = rabbitmq_rtopic_exchange
PROJECT_DESCRIPTION = Reverse Topic Exchange Type
RABBITMQ_VERSION ?= v3.11.x
RABBITMQ_VERSION ?= v3.13.x
current_rmq_ref = $(RABBITMQ_VERSION)

define PROJECT_APP_EXTRA_KEYS
{broker_version_requirements, ["3.11.0"]}
{broker_version_requirements, ["3.13.0"]}
endef

DEPS = rabbit_common rabbit
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ The exchange type used when declaring an exchange is `x-rtopic`.

## Supported RabbitMQ Versions

The most recent release of this plugin targets RabbitMQ 3.12.x.
The most recent release of this plugin targets RabbitMQ 3.13.x.

This plugin requires Mnesia and does not work with Khepri!

## Supported Erlang/OTP Versions

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

## Installation and Binary Builds

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

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

Expand Down
2 changes: 1 addition & 1 deletion helpers.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@rules_erlang//:ct.bzl", "ct_test")

BROKER_VERSION_REQUIREMENTS_TERM = """{broker_version_requirements, ["3.11.0"]}"""
BROKER_VERSION_REQUIREMENTS_TERM = """{broker_version_requirements, ["3.13.0"]}"""

def rabbitmq_suite(
name = None,
Expand Down
6 changes: 3 additions & 3 deletions src/rabbit_exchange_type_rtopic.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

-behaviour(rabbit_exchange_type).

-export([description/0, serialise_events/0, route/2]).
-export([description/0, serialise_events/0, route/3]).
-export([validate/1, validate_binding/2,
create/2, delete/2, policy_changed/2, add_binding/3,
remove_bindings/3, assert_args_equivalence/2]).
Expand Down Expand Up @@ -58,8 +58,8 @@ description() ->
serialise_events() -> false.

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