noxdafox / rabbitmq-message-deduplication

RabbitMQ Plugin for filtering message duplicates
Mozilla Public License 2.0
271 stars 33 forks source link

Error when activating the plugin #63

Closed RafaMunoz closed 3 years ago

RafaMunoz commented 3 years ago

Hello,

I am getting the following error when activating the plugin. It is installed on a RedHat 8, RabbitMQ 3.8.2 and Erlang 22.2.6. It is a two node RabbitMQ cluster and I have disabled queue mirroring because I read that it is not supported.

The process I have carried out has been to copy the files elixir-1.8.2.ez and rabbitmq_message_deduplication-v3.8.x_0.4.5.ez to the two nodes in the path /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.2/plugins / and then run the command sudo rabbitmq-plugins enable rabbitmq_message_deduplication.

Enabling plugins on node rabbit@node01:
rabbitmq_message_deduplication
The following plugins have been configured:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_message_deduplication
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@node01...
Stack trace:

** (FunctionClauseError) no function clause matching in :rabbit_plugins.is_stric                                                                                                                                                             tly_plugin/1
    (rabbit) src/rabbit_plugins.erl:245: :rabbit_plugins.is_strictly_plugin(fals                                                                                                                                                             e)
    (stdlib) lists.erl:1286: :lists."-filter/2-lc$^0/1-0-"/2
    (rabbitmqctl) lib/rabbitmq/cli/plugins/commands/enable_command.ex:161: Rabbi                                                                                                                                                             tMQ.CLI.Plugins.Commands.EnableCommand.filter_strictly_plugins/3
    (elixir) lib/stream.ex:1325: anonymous fn/2 in Stream.iterate/2
    (elixir) lib/stream.ex:1512: Stream.do_unfold/4
    (elixir) lib/stream.ex:1583: Enumerable.Stream.do_each/4
    (elixir) lib/stream.ex:952: Stream.do_enum_transform/7
    (elixir) lib/stream.ex:1583: Enumerable.Stream.do_each/4

:function_clause
noxdafox commented 3 years ago

This is a duplicate of #56.

As already explained, this problem is due to the rabbitmq-cli getting confused by the elixir dependency of the plugin. The issue happens at the end of the execution command and does not affect neither the broker nor the plugin.

The issue is fixed in more recent versions on rabbitmq.