We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45054d4 commit 268c926Copy full SHA for 268c926
Confluent.Kafka.Dataflow/Internal/ConsumerBlockFactory.cs
@@ -128,9 +128,13 @@ public async Task<TopicPartitionOffset> Consume(CancellationToken cancellationTo
128
var task = this.buffer.SendAsync(kvp, cancellationToken);
129
while (await Task.WhenAny(task, Task.Delay(HEARTBEAT_INTERVAL, cancellationToken)) != task)
130
{
131
- // Reconsume to stay in consumer group.
132
- this.consumer.Seek(result.TopicPartitionOffset);
133
- this.consumer.Consume(cancellationToken);
+ // Poll for message to stay in consumer group.
+ var next = this.consumer.Consume(TimeSpan.Zero);
+ if (next != null)
134
+ {
135
+ // Go back to where we were.
136
+ this.consumer.Seek(next.TopicPartitionOffset);
137
+ }
138
}
139
140
if (!task.Result)
0 commit comments