rabbitmq-server/deps/rabbit
David Ansari 6413d2d7dd Fix channel reuse bug
This commit fixes the following test flake that occurred in CI:
```
make -C deps/rabbit ct-amqp_dotnet t=cluster_size_1:redelivery
```

After receiving the end frame, the server session proc replies with the end frame.

Usually when the test case succeeds, the server connection process receives
a DOWN for the session proc and untracks its channel number such that a
subsequent begin frame for the same channel number will create a new session
proc in the server.

In the flake however, the client receives the end, and pipelines new begin,
attach, and flow frames. These frames are received in the server connection's
mailbox before the monitor for the old session proc fires. That's why these
new frames are sent to the old session proc causing the test case to
fail.

This reveals a bug in the server.
This commit fixes this bug similarly as done in the AMQP 0.9.1 channel in
94b4a6aafd/deps/rabbit/src/rabbit_channel.erl (L1146-L1155)

Channel reuse by the client is valid and actually common, e.g. if channel-max
is 0.
2025-07-31 13:10:23 +02:00
..
docs Add rabbitmq-streams reset_offset command 2025-07-01 17:46:44 +02:00
include [skip ci] Remove rabbit_log and switch to LOG_ macros 2025-07-18 08:42:59 +02:00
priv/schema Rename 2025-06-25 16:15:42 +04:00
scripts Fix the CLI's main module on Windows 2025-03-26 16:32:38 +01:00
src Fix channel reuse bug 2025-07-31 13:10:23 +02:00
test rabbit_stream_queue_SUITE: Wait for replicas in `shrink_coordinator_cluster/1` 2025-07-30 15:04:49 +02:00
.gitignore make: Remove rabbitmq-deps.mk related targets 2024-08-29 15:19:14 +02:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
INSTALL Use the new URLs of the `www.rabbitmq.com` website 2024-09-23 11:34:54 +02:00
LICENSE Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
LICENSE-MPL-RabbitMQ
Makefile Remove rabbit_log from Makefile 2025-07-18 08:43:04 +02:00
README.md Use the new URLs of the `www.rabbitmq.com` website 2024-09-23 11:34:54 +02:00
SECURITY.md Use the new URLs of the `www.rabbitmq.com` website 2024-09-23 11:34:54 +02:00
ct.test.spec Update ct.test.spec 2025-06-25 17:41:18 +04:00

README.md

RabbitMQ Server

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

  • AMQP 0-9-1
  • AMQP 1.0
  • MQTT 3.1.1
  • STOMP 1.0 through 1.2

Installation

Tutorials & Documentation

Getting Help

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-2024 Broadcom. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.