diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2012-11-22 15:50:14 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2012-11-22 15:50:14 +0000 |
| commit | 16bb43a74b9e79f90f47ab75fef28b842928acb9 (patch) | |
| tree | a862af5f5efe60a09c1736bf22107e5dee047263 | |
| parent | b9f041a345223707cbb915e5ea5df132aafefb6a (diff) | |
| download | rabbitmq-server-git-16bb43a74b9e79f90f47ab75fef28b842928acb9.tar.gz | |
Explain
| -rw-r--r-- | src/rabbit_channel.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 6ccc2e65d2..b1ef3b6bdf 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1357,6 +1357,16 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{ queue_monitors = QMons}) -> Qs = rabbit_amqqueue:lookup(DelQNames), {RoutingRes, DeliveredQPids} = rabbit_amqqueue:deliver_flow(Qs, Delivery), + %% The pmon:monitor_all/2 monitors all queues to which we + %% delivered. But we want to monitor even queues we didn't deliver + %% to, since we need their 'DOWN' messages to clean + %% queue_names. So we also need to monitor each QPid from + %% queues. But that only gets the masters (which is fine for + %% cleaning queue_names), so we need the union of both. + %% + %% ...and we need to add even non-delivered queues to queue_names + %% since alternative algorithms to update queue_names less + %% frequently would in fact be more expensive in the common case. {QNames1, QMons1} = lists:foldl(fun (#amqqueue{pid = QPid, name = QName}, {QNames0, QMons0}) -> |
