From e121a5b32cb3d242241d205721cf11eb38e17b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Massada?= Date: Sat, 20 Jul 2024 23:25:48 +0100 Subject: [PATCH] fix: stop flow manager after calling revoke handlers --- src/KafkaFlow/Consumers/Consumer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KafkaFlow/Consumers/Consumer.cs b/src/KafkaFlow/Consumers/Consumer.cs index 3fef05e5f..7f478f6e5 100644 --- a/src/KafkaFlow/Consumers/Consumer.cs +++ b/src/KafkaFlow/Consumers/Consumer.cs @@ -242,11 +242,11 @@ private void EnsureConsumer() .SetPartitionsRevokedHandler( (consumer, partitions) => { + _partitionsRevokedHandlers.ForEach(handler => handler(_dependencyResolver, consumer, partitions)); this.Assignment = new List(); this.Subscription = new List(); _currentPartitionsOffsets.Clear(); _flowManager.Stop(); - _partitionsRevokedHandlers.ForEach(handler => handler(_dependencyResolver, consumer, partitions)); }) .SetErrorHandler((consumer, error) => _errorsHandlers.ForEach(x => x(consumer, error))) .SetStatisticsHandler((consumer, statistics) => _statisticsHandlers.ForEach(x => x(consumer, statistics)));