From 847e6a6d838a58b9700f6ac6b429eb82e4506e9c Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Fri, 8 Oct 2021 15:50:59 +0200 Subject: [PATCH 1/2] Fixed #35: NullReferenceException in Cancel --- Tapeti/Connection/TapetiSubscriber.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tapeti/Connection/TapetiSubscriber.cs b/Tapeti/Connection/TapetiSubscriber.cs index 3b92262..c8133cc 100644 --- a/Tapeti/Connection/TapetiSubscriber.cs +++ b/Tapeti/Connection/TapetiSubscriber.cs @@ -143,13 +143,13 @@ namespace Tapeti.Connection { var queues = config.Bindings.GroupBy(binding => binding.QueueName); - consumerTags.AddRange(await Task.WhenAll(queues.Select(async group => + consumerTags.AddRange((await Task.WhenAll(queues.Select(async group => { var queueName = group.Key; var consumer = new TapetiConsumer(cancellationToken, config, queueName, group); return await clientFactory().Consume(cancellationToken, queueName, consumer); - }))); + }))).Where(t => t != null)); } From 017c4c130f0a992f1c3c1fb5a92edfeba4161c07 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Tue, 26 Oct 2021 13:29:48 +0200 Subject: [PATCH 2/2] Fixed prefetchcount being applied to the incorrect channel --- Tapeti/Connection/TapetiClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tapeti/Connection/TapetiClient.cs b/Tapeti/Connection/TapetiClient.cs index fba46b8..9f68728 100644 --- a/Tapeti/Connection/TapetiClient.cs +++ b/Tapeti/Connection/TapetiClient.cs @@ -820,7 +820,7 @@ namespace Tapeti.Connection } if (connectionParams.PrefetchCount > 0) - capturedPublishChannelModel.BasicQos(0, connectionParams.PrefetchCount, false); + capturedConsumeChannelModel.BasicQos(0, connectionParams.PrefetchCount, false); capturedPublishChannelModel.ModelShutdown += (_, e) => {