Skip to content

Commit

Permalink
Make plugin compatible with 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ansd committed May 31, 2023
1 parent 07af0c0 commit cf3d921
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
@@ -1,11 +1,11 @@
PROJECT = rabbitmq_lvc_exchange
PROJECT_DESCRIPTION = RabbitMQ Last Value Cache exchange

RABBITMQ_VERSION ?= v3.11.x
RABBITMQ_VERSION ?= v3.12.x
current_rmq_ref = $(RABBITMQ_VERSION)

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

dep_amqp_client = git_rmq-subfolder rabbitmq-erlang-client $(RABBITMQ_VERSION)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -16,12 +16,11 @@ binding key.

## Supported RabbitMQ Versions

The most recent release of this plugin targets RabbitMQ 3.11.x.
Release series earlier than 3.9 are [out of support](https://www.rabbitmq.com/versions.html).
The most recent release of this plugin targets RabbitMQ 3.12.x.

## Supported Erlang/OTP Versions

Latest version of this plugin [requires Erlang 25.0 or later versions](https://www.rabbitmq.com/which-erlang.html), same as RabbitMQ 3.11.x.
Latest version of this plugin [requires Erlang 25.0 or later versions](https://www.rabbitmq.com/which-erlang.html), same as RabbitMQ 3.12.x.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions src/rabbit_exchange_type_lvc.erl
Expand Up @@ -32,7 +32,7 @@ route(#exchange{name = Name},
CC when is_list(CC) -> CC;
To -> [To]
end,
rabbit_misc:execute_mnesia_transaction(
rabbit_mnesia:execute_mnesia_transaction(
fun () ->
[mnesia:write(?LVC_TABLE,
#cached{key = #cachekey{exchange=Name,
Expand Down Expand Up @@ -85,7 +85,7 @@ add_binding(none, #exchange{ name = XName },
[#cached{content = Msg}] ->
Delivery = rabbit_basic:delivery(
false, false, Msg, undefined),
Qs = rabbit_amqqueue:lookup(
Qs = rabbit_amqqueue:lookup_many(
rabbit_exchange:route(E, Delivery)),
rabbit_amqqueue:deliver(Qs, Delivery)
end
Expand Down

0 comments on commit cf3d921

Please sign in to comment.