From 74ad8fb43e7dafa367ad2a7998c23ae651bd0815 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 10 Sep 2019 19:01:01 +0200 Subject: [PATCH] Fixed consumers after reconnect --- Tapeti/Connection/TapetiSubscriber.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tapeti/Connection/TapetiSubscriber.cs b/Tapeti/Connection/TapetiSubscriber.cs index ce309b2..af5ca5d 100644 --- a/Tapeti/Connection/TapetiSubscriber.cs +++ b/Tapeti/Connection/TapetiSubscriber.cs @@ -26,9 +26,12 @@ namespace Tapeti.Connection } - public Task RebindQueues() + public async Task RebindQueues() { - return BindQueues(); + await BindQueues(); + + if (consuming) + await Task.WhenAll(queues.Select(queue => workerFactory().Consume(queue.Name, queue.Bindings)).ToList()); }