Skip to content

Commit f8bdd33

Browse files
committed
Remove rabbit_queue_collector
rabbit_queue_collector is responsible for synchronously deleting exclusive queues. Since the AMQP 1.0 plugin never creates exclusive queues, rabbit_queue_collector doesn't need to be started in the first place. This will save 1 Erlang process per AMQP 1.0 connection.
1 parent d427d47 commit f8bdd33

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
%%--------------------------------------------------------------------------
3030

3131
-record(v1, {parent, sock, connection, callback, recv_len, pending_recv,
32-
connection_state, queue_collector, heartbeater, helper_sup,
32+
connection_state, heartbeater, helper_sup,
3333
channel_sup_sup_pid, buf, buf_len, throttle, proxy_socket,
3434
tracked_channels}).
3535

@@ -61,7 +61,6 @@ unpack_from_0_9_1(
6161
recv_len = RecvLen,
6262
pending_recv = PendingRecv,
6363
connection_state = pre_init,
64-
queue_collector = undefined,
6564
heartbeater = none,
6665
helper_sup = HelperSupPid,
6766
buf = Buf,
@@ -411,10 +410,6 @@ handle_1_0_connection_frame(#'v1_0.open'{ max_frame_size = ClientFrameMax,
411410
"frame_max=~w < ~w min size",
412411
[FrameMax, ?FRAME_1_0_MIN_SIZE]);
413412
true ->
414-
{ok, Collector} =
415-
%% TODO Do we still need the queue_collector?
416-
rabbit_connection_helper_sup:start_queue_collector(
417-
HelperSupPid, <<"AMQP 1.0">>), %% TODO describe the connection
418413
SendFun =
419414
fun() ->
420415
Frame =
@@ -439,8 +434,7 @@ handle_1_0_connection_frame(#'v1_0.open'{ max_frame_size = ClientFrameMax,
439434
connection = Connection#v1_connection{
440435
frame_max = FrameMax,
441436
hostname = Hostname},
442-
heartbeater = Heartbeater,
443-
queue_collector = Collector}
437+
heartbeater = Heartbeater}
444438
end,
445439
HostnameVal = case Hostname of
446440
undefined -> undefined;

0 commit comments

Comments
 (0)