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)));