Go to file
David Ansari a5f4317c3f Fix test flake session_takeover_v3_v5
Prior to this commit the follwing test was flaky:
```
bazel test //deps/rabbitmq_mqtt:v5_SUITE -t- --test_sharding_strategy=disabled \
    --test_env FOCUS="-group [mqtt,cluster_size_3] -case session_takeover_v3_v5" \
    --test_env RABBITMQ_METADATA_STORE=khepri --config=rbe-26 --runs_per_test=20
```
because rabbit_misc:maps_any/2 filtered out a destination queue after routing if
that destination queue wasn't associated with any matched binding key.

This commit makes the test green.

However, the root cause of this issue isn't solved:
MQTT 5.0 requires the topic exchange to return matched binding keys for
destination queues such that feature NoLocal, and Subscription
Identifiers work correctly.

The current MQTT plugin relies on session state to be stored
consistently in the database. When a new client connects, the session
state is retrieved from the database and appropriate actions are taken:
e.g. consume from a queue, modify binding arguments, etc.

With Mnesia this consistency was guaranteed thanks to sync transactions
when updating queues and bindings.

Khepri has only eventual consistency semantics. This is problematic for the
MQTT plugin in the session_takeover_v3_v5 test scenario:

1. Client subscribes on node 1 (with v3). Node 1 returns subscription
   success to client.
2. **Thereafter**, another client with the same MQTT client ID connects
   to node 0 (with v5). "Proper" session takeover should take place.
   However due to eventual consistency, the subscription / binding isn't
   present yet on node 0. Therefore the session upgrade from v3 to v5
   does not take place and leads to binding keys being absent when
   messages are routed to the session's queue.
2023-10-30 09:39:49 +01:00
.github Workflows: use Erlang 26 as 25.3 is no longer supported 2023-10-25 22:53:57 -04:00
bazel Partially revert commit 3253fe433b 2023-09-29 16:00:11 +02:00
deps Fix test flake session_takeover_v3_v5 2023-10-30 09:39:49 +01:00
doc
mk
packaging Use OTP 26.1 as OTP 26 in CI 2023-09-20 15:33:34 +02:00
release-notes 3.11.25 release notes 2023-10-29 20:04:30 -04:00
scripts Allow ranges for more control 2023-06-13 19:46:55 +00:00
tools Message Containers (#5077) 2023-08-31 11:27:13 +01:00
.bazelignore Add "bazel run //tools:symlink_deps_for_erlang_ls" 2023-01-05 13:02:02 +01:00
.bazelrc Use rules_erlang 3.13.1 2023-10-17 11:22:36 -04:00
.bazelversion
.dockerignore
.git-blame-ignore-revs Ignore code formatter commits in git blame 2023-01-29 14:16:18 +00:00
.gitignore Use rules_erlang 3.13.1 2023-10-17 11:22:36 -04:00
BAZEL.md Update bazel docs 2023-09-13 15:22:52 +02:00
BUILD.bats
BUILD.bazel bazel run gazelle 2023-09-20 04:03:13 +00:00
BUILD.package_generic_unix
CODE_OF_CONDUCT.md Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
CONTRIBUTING.md Update CONTRIBUTING.md to mention Bazel 2023-04-27 13:39:15 +04:00
LICENSE Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
LICENSE-APACHE2
LICENSE-MPL-RabbitMQ
MODULE.bazel Upgrade khepri_mnesia_migration from 0.1.1 to 0.2.1 2023-10-27 16:08:43 +02:00
Makefile Use pkg_files rules to avoid extra tars 2023-03-14 23:18:00 +01:00
PKG_LINUX.md
PKG_WINDOWS.md
README.md Update README.md 2023-10-15 16:00:19 +02:00
SERVER_RELEASES.md
WORKSPACE Update rules_erlang version in WORKSPACE to match MODULE.bazel 2023-10-19 20:26:00 +02:00
dist.bzl Make the extension of :package-generic-unix configurable in bazel 2023-06-20 10:14:31 +02:00
erlang.mk Update Erlang.mk 2023-07-17 11:12:25 +02:00
erlang_ls.config erlang_ls: Look for lib includes in extra_deps 2023-02-14 17:34:13 -06:00
moduleindex.yaml bazel run gazelle 2023-10-11 04:03:50 +00:00
plugins.mk
rabbitmq-components.mk Upgrade khepri_mnesia_migration from 0.1.1 to 0.2.1 2023-10-27 16:08:43 +02:00
rabbitmq.bzl Do not enable OTP feature at runtime 2023-10-27 09:26:31 +02:00
rabbitmq_home.bzl Add a workflow to compare the bazel/erlang.mk output 2023-05-15 13:54:14 +02:00
rabbitmq_package_generic_unix.bzl
rabbitmq_run.bzl
rabbitmqctl.bzl Fix shell quoting in bazel rabbitmqctl helper 2023-02-01 16:40:36 +01:00
rebar.config Revert "Format MQTT code with `erlfmt`" 2023-01-27 18:25:57 +00:00
user-template.bazelrc

README.md

Test

RabbitMQ Server

RabbitMQ is a feature rich, multi-protocol messaging and streaming broker. It supports:

Installation

Tutorials and Documentation

Some key doc guides include

RabbitMQ documentation is also developed on GitHub.

Commercial Features and Support

Getting Help from the Community

Contributing

See CONTRIBUTING.md and our development process overview.

Questions about contributing, internals and so on are very welcome on the mailing list.

Licensing

RabbitMQ server is licensed under the MPL 2.0.

Building From Source and Packaging

(c) 2007-2023 VMware, Inc. or its affiliates.