Skip to content

Commit c7c7cd1

Browse files
Merge branch 'main' into message-interceptors
2 parents 8acdc65 + 1aa3342 commit c7c7cd1

File tree

10 files changed

+83
-65
lines changed

10 files changed

+83
-65
lines changed

deps/rabbit/src/rabbit_amqp_management.erl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ handle_http_req(HttpMethod = <<"PUT">>,
127127
PermCache1 = check_resource_access(QName, configure, User, PermCache0),
128128
rabbit_core_metrics:queue_declared(QName),
129129

130-
{Q1, NumMsgs, NumConsumers, StatusCode, PermCache} =
131130
case rabbit_amqqueue:with(
132131
QName,
133132
fun(Q) ->
134133
try rabbit_amqqueue:assert_equivalence(
135134
Q, Durable, AutoDelete, QArgs, Owner) of
136135
ok ->
137136
{ok, Msgs, Consumers} = rabbit_amqqueue:stat(Q),
138-
{ok, {Q, Msgs, Consumers, <<"200">>, PermCache1}}
137+
RespPayload = encode_queue(Q, Msgs, Consumers),
138+
{ok, {<<"200">>, RespPayload, {PermCache1, TopicPermCache}}}
139139
catch exit:#amqp_error{name = precondition_failed,
140140
explanation = Expl} ->
141141
throw(<<"409">>, Expl, []);
@@ -146,23 +146,26 @@ handle_http_req(HttpMethod = <<"PUT">>,
146146
{ok, Result} ->
147147
Result;
148148
{error, not_found} ->
149-
PermCache2 = check_dead_letter_exchange(QName, QArgs, User, PermCache1),
149+
PermCache = check_dead_letter_exchange(QName, QArgs, User, PermCache1),
150+
PermCaches = {PermCache, TopicPermCache},
150151
try rabbit_amqqueue:declare(
151152
QName, Durable, AutoDelete, QArgs, Owner, Username) of
152153
{new, Q} ->
153154
rabbit_core_metrics:queue_created(QName),
154-
{Q, 0, 0, <<"201">>, PermCache2};
155+
RespPayload = encode_queue(Q, 0, 0),
156+
{<<"201">>, RespPayload, PermCaches};
155157
{owner_died, Q} ->
156158
%% Presumably our own days are numbered since the
157159
%% connection has died. Pretend the queue exists though,
158160
%% just so nothing fails.
159-
{Q, 0, 0, <<"201">>, PermCache2};
161+
RespPayload = encode_queue(Q, 0, 0),
162+
{<<"201">>, RespPayload, PermCaches};
160163
{absent, Q, Reason} ->
161164
absent(Q, Reason);
162165
{existing, _Q} ->
163166
%% Must have been created in the meantime. Loop around again.
164167
handle_http_req(HttpMethod, PathSegments, Query, ReqPayload,
165-
Vhost, User, ConnPid, {PermCache2, TopicPermCache});
168+
Vhost, User, ConnPid, PermCaches);
166169
{error, queue_limit_exceeded, Reason, ReasonArgs} ->
167170
throw(<<"403">>,
168171
Reason,
@@ -177,10 +180,7 @@ handle_http_req(HttpMethod = <<"PUT">>,
177180
end;
178181
{error, {absent, Q, Reason}} ->
179182
absent(Q, Reason)
180-
end,
181-
182-
RespPayload = encode_queue(Q1, NumMsgs, NumConsumers),
183-
{StatusCode, RespPayload, {PermCache, TopicPermCache}};
183+
end;
184184

185185
handle_http_req(<<"PUT">>,
186186
[<<"exchanges">>, XNameBinQuoted],

deps/rabbit/src/rabbit_prelaunch_logging.erl

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,7 @@ configure_logger(Context) ->
527527
%% We can now install the new handlers. The function takes care of
528528
%% removing previously configured handlers (after installing the new
529529
%% ones to ensure we don't loose a message).
530-
ok = install_handlers(Handlers),
531-
532-
%% Let's log a message per log level (if debug logging is enabled). This
533-
%% is handy if the user wants to verify the configuration is what he
534-
%% expects.
535-
ok = maybe_log_test_messages(LogConfig3).
530+
ok = install_handlers(Handlers).
536531

537532
-spec get_log_configuration_from_app_env() -> log_config().
538533

@@ -1690,34 +1685,3 @@ get_less_severe_level(LevelA, LevelB) ->
16901685
lt -> LevelA;
16911686
_ -> LevelB
16921687
end.
1693-
1694-
-spec maybe_log_test_messages(log_config()) -> ok.
1695-
1696-
maybe_log_test_messages(
1697-
#{per_category := #{prelaunch := #{level := debug}}}) ->
1698-
log_test_messages();
1699-
maybe_log_test_messages(
1700-
#{global := #{level := debug}}) ->
1701-
log_test_messages();
1702-
maybe_log_test_messages(_) ->
1703-
ok.
1704-
1705-
-spec log_test_messages() -> ok.
1706-
1707-
log_test_messages() ->
1708-
?LOG_DEBUG("Logging: testing debug log level",
1709-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1710-
?LOG_INFO("Logging: testing info log level",
1711-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1712-
?LOG_NOTICE("Logging: testing notice log level",
1713-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1714-
?LOG_WARNING("Logging: testing warning log level",
1715-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1716-
?LOG_ERROR("Logging: testing error log level",
1717-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1718-
?LOG_CRITICAL("Logging: testing critical log level",
1719-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1720-
?LOG_ALERT("Logging: testing alert log level",
1721-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),
1722-
?LOG_EMERGENCY("Logging: testing emergency log level",
1723-
#{domain => ?RMQLOG_DOMAIN_PRELAUNCH}).

deps/rabbit/test/amqp_jms_SUITE_data/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<name>rabbitmq-amqp-jms-tests</name>
99
<url>https://www.rabbitmq.com</url>
1010
<properties>
11-
<junit.jupiter.version>5.12.1</junit.jupiter.version>
11+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
1212
<assertj.version>3.27.3</assertj.version>
1313
<qpid-jms-client.version>2.7.0</qpid-jms-client.version>
1414
<amqp-client.version>[0.6.0-SNAPSHOT,)</amqp-client.version>
1515
<logback.version>1.5.18</logback.version>
16-
<spotless.version>2.44.3</spotless.version>
16+
<spotless.version>2.44.4</spotless.version>
1717
<google-java-format.version>1.26.0</google-java-format.version>
1818
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
1919
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>

deps/rabbitmq_amqp_client/test/management_SUITE.erl

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ groups() ->
5252
bad_exchange_property,
5353
bad_exchange_type,
5454
get_queue_not_found,
55+
declare_queues_concurrently,
5556
declare_queue_default_queue_type,
5657
declare_queue_empty_name,
5758
declare_queue_line_feed,
@@ -432,6 +433,40 @@ get_queue_not_found(Config) ->
432433
amqp10_msg:body(Resp)),
433434
ok = cleanup(Init).
434435

436+
declare_queues_concurrently(Config) ->
437+
NumQueues = 5,
438+
{Pid1, Ref1} = spawn_monitor(?MODULE, declare_queues, [Config, NumQueues]),
439+
{Pid2, Ref2} = spawn_monitor(?MODULE, declare_queues, [Config, NumQueues]),
440+
receive {'DOWN', Ref1, process, Pid1, Reason1} ->
441+
?assertEqual(normal, Reason1)
442+
end,
443+
receive {'DOWN', Ref2, process, Pid2, Reason2} ->
444+
?assertEqual(normal, Reason2)
445+
end,
446+
447+
?assertEqual(NumQueues, count_queues(Config)),
448+
449+
Init = {_, LinkPair} = init(Config),
450+
lists:foreach(fun(N) ->
451+
Bin = integer_to_binary(N),
452+
QName = <<"queue-", Bin/binary>>,
453+
{ok, _} = rabbitmq_amqp_client:delete_queue(LinkPair, QName)
454+
end, lists:seq(1, NumQueues)),
455+
ok = cleanup(Init).
456+
457+
declare_queues(Config, Num) ->
458+
Init = {_, LinkPair} = init(Config),
459+
ok = declare_queues0(LinkPair, Num),
460+
ok = cleanup(Init).
461+
462+
declare_queues0(_LinkPair, 0) ->
463+
ok;
464+
declare_queues0(LinkPair, Left) ->
465+
Bin = integer_to_binary(Left),
466+
QName = <<"queue-", Bin/binary>>,
467+
?assertMatch({ok, _}, rabbitmq_amqp_client:declare_queue(LinkPair, QName, #{})),
468+
declare_queues0(LinkPair, Left - 1).
469+
435470
declare_queue_default_queue_type(Config) ->
436471
Node = get_node_config(Config, 0, nodename),
437472
Vhost = QName = atom_to_binary(?FUNCTION_NAME),
@@ -871,11 +906,11 @@ pipeline(Config) ->
871906
%% because RabbitMQ grants us 8 link credits initially.
872907
Num = 8,
873908
pipeline0(Num, LinkPair, <<"PUT">>, {map, []}),
874-
eventually(?_assertEqual(Num, rpc(Config, rabbit_amqqueue, count, [])), 200, 20),
909+
eventually(?_assertEqual(Num, count_queues(Config)), 200, 20),
875910
flush(queues_created),
876911

877912
pipeline0(Num, LinkPair, <<"DELETE">>, null),
878-
eventually(?_assertEqual(0, rpc(Config, rabbit_amqqueue, count, [])), 200, 20),
913+
eventually(?_assertEqual(0, count_queues(Config)), 200, 20),
879914
flush(queues_deleted),
880915

881916
ok = cleanup(Init).
@@ -1127,3 +1162,6 @@ gen_server_state(Pid) ->
11271162
L1 = lists:last(L0),
11281163
{data, L2} = lists:last(L1),
11291164
proplists:get_value("State", L2).
1165+
1166+
count_queues(Config) ->
1167+
rpc(Config, rabbit_amqqueue, count, []).

deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<properties>
3636
<maven.compiler.source>17</maven.compiler.source>
3737
<maven.compiler.target>17</maven.compiler.target>
38-
<junit.jupiter.version>5.12.1</junit.jupiter.version>
38+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
3939
</properties>
4040

4141
<groupId>com.rabbitmq.examples</groupId>

deps/rabbitmq_mqtt/test/java_SUITE_data/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
<paho.v5.version>[1.2.5,)</paho.v5.version>
1717
<paho.v3.version>[1.2.5,)</paho.v3.version>
1818
<amqp-client.version>5.25.0</amqp-client.version>
19-
<junit.version>5.12.1</junit.version>
19+
<junit.version>5.12.2</junit.version>
2020
<assertj.version>3.27.3</assertj.version>
2121
<logback.version>1.2.13</logback.version>
2222
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
2323
<groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
2424
<groovy.version>2.4.21</groovy.version>
2525
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
26-
<spotless.version>2.44.3</spotless.version>
26+
<spotless.version>2.44.4</spotless.version>
2727
<google-java-format.version>1.17.0</google-java-format.version>
2828
<test-keystore.ca>${project.build.directory}/ca.keystore</test-keystore.ca>
2929
<test-keystore.password>bunnychow</test-keystore.password>

deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727

2828
<properties>
2929
<stream-client.version>[0.12.0-SNAPSHOT,)</stream-client.version>
30-
<junit.jupiter.version>5.12.1</junit.jupiter.version>
30+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
3131
<assertj.version>3.27.3</assertj.version>
3232
<logback.version>1.2.13</logback.version>
3333
<maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
3434
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
35-
<spotless.version>2.44.3</spotless.version>
35+
<spotless.version>2.44.4</spotless.version>
3636
<google-java-format.version>1.17.0</google-java-format.version>
3737
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3838
</properties>

deps/rabbitmq_stream_management/test/http_SUITE_data/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727

2828
<properties>
2929
<stream-client.version>[0.12.0-SNAPSHOT,)</stream-client.version>
30-
<junit.jupiter.version>5.12.1</junit.jupiter.version>
30+
<junit.jupiter.version>5.12.2</junit.jupiter.version>
3131
<assertj.version>3.27.3</assertj.version>
3232
<logback.version>1.2.13</logback.version>
3333
<maven.compiler.plugin.version>3.14.0</maven.compiler.plugin.version>
3434
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
35-
<spotless.version>2.44.3</spotless.version>
35+
<spotless.version>2.44.4</spotless.version>
3636
<google-java-format.version>1.18.1</google-java-format.version>
3737
<okhttp.version>4.12.0</okhttp.version>
38-
<gson.version>2.12.1</gson.version>
38+
<gson.version>2.13.0</gson.version>
3939
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4040
</properties>
4141

rabbitmq-components.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ dep_jose = hex 1.11.10
4949
dep_khepri = hex 0.17.1
5050
dep_khepri_mnesia_migration = hex 0.8.0
5151
dep_meck = hex 1.0.0
52-
dep_osiris = git https://github.com/rabbitmq/osiris v1.8.6
52+
dep_osiris = git https://github.com/rabbitmq/osiris v1.8.7
5353
dep_prometheus = hex 4.11.0
54-
dep_ra = hex 2.16.7
54+
dep_ra = hex 2.16.8
5555
dep_ranch = hex 2.2.0
5656
dep_recon = hex 2.5.6
5757
dep_redbug = hex 2.0.7

release-notes/4.1.0.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## RabbitMQ 4.1.0-rc.1
1+
## RabbitMQ 4.1.0-rc.2
22

3-
RabbitMQ 4.1.0-rc.1 is a candidate of a new feature release.
3+
RabbitMQ 4.1.0-rc.2 is a candidate of a new feature release.
44

55
See Compatibility Notes below to learn about **breaking or potentially breaking changes** in this release.
66

@@ -229,6 +229,11 @@ This section can be incomplete and will be expanded as 4.1 approaches its releas
229229

230230
GitHub issues: [#12801](https://github.com/rabbitmq/rabbitmq-server/pull/12801), [#12809](https://github.com/rabbitmq/rabbitmq-server/pull/12809)
231231

232+
* Quorum queue's [continuous membership reconciliation mechanism](https://www.rabbitmq.com/docs/quorum-queues#replica-reconciliation) (CMR) efficiency
233+
and resilience improvements.
234+
235+
GitHub issue: [#13703](https://github.com/rabbitmq/rabbitmq-server/pull/13703)
236+
232237
* AMQP 1.0 and AMQP 0-9-1 connections now produce more specific error messages when an incorrect data is sent
233238
by the client during connection negotiation.
234239

@@ -544,6 +549,11 @@ This section can be incomplete and will be expanded as 4.1 approaches its releas
544549

545550
GitHub issue: [#13657](https://github.com/rabbitmq/rabbitmq-server/pull/13657)
546551

552+
* A TCP connection to the stream protocol port that sent no data (e.g. a TCP load balancer check)
553+
produced a harmless but scary looking exception in the log.
554+
555+
GitHub issue: [#13701](https://github.com/rabbitmq/rabbitmq-server/pull/13674)
556+
547557

548558
### OAuth 2 AuthN and AuthZ Plugin
549559

@@ -613,6 +623,10 @@ This section can be incomplete and will be expanded as 4.1 approaches its releas
613623

614624
GitHub issue: [#12713](https://github.com/rabbitmq/rabbitmq-server/pull/12713)
615625

626+
* Federation status command and HTTP API endpoint could run into an exception.
627+
628+
GitHub issue: [#13701](https://github.com/rabbitmq/rabbitmq-server/pull/13701)
629+
616630

617631
### Shovel Plugin
618632

@@ -728,8 +742,10 @@ This section can be incomplete and will be expanded as 4.1 approaches its releas
728742

729743
### Dependency Changes
730744

731-
* `ra` was upgraded to [`2.16.6`](https://github.com/rabbitmq/ra/releases)
732-
* `osiris` was upgraded to [`1.8.6`](https://github.com/rabbitmq/osiris/releases)
745+
* `ra` was upgraded to [`2.16.8`](https://github.com/rabbitmq/ra/releases)
746+
* `osiris` was upgraded to [`1.8.7`](https://github.com/rabbitmq/osiris/releases)
747+
* `khepri` was upgraded to [`0.16.0`](https://github.com/rabbitmq/khepri/releases)
748+
* `khepri_mnesia_migration` was upgraded to [`0.7.2`](https://github.com/rabbitmq/khepri_mnesia_migration/releases)
733749
* `observer_cli` was upgraded to [`1.8.2`](https://github.com/zhongwencool/observer_cli/releases)
734750
* `eetcd` was upgraded to [`0.5.0`](https://github.com/zhongwencool/eetcd/releases)
735751
* `gun` was upgraded to [`2.1.0`](https://github.com/ninenines/gun/releases)

0 commit comments

Comments
 (0)