confluent-kafka-dotnet
confluent-kafka-dotnet copied to clipboard
Getting Exeception not consuming
Beacause of what issue this error is coming
=========== System.OperationCanceledException: The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException() at Confluent.Kafka.Consumer`2.Consume(CancellationToken cancellationToken) at PublicPagesImpactSyncService.Service.ImpactMetricsSinkService.<>c__DisplayClass9_0.<<ExecuteAsync>b__0>d.MoveNext() in ImpactMetricsSinkService.cs:line 68
================
Please use stackoverflow to get a quicker response to usage questions like this. However, it's important to provide much more context (code, stuff you are doing, stuff you've tried) there too - you'll have a much better chance of getting help if you meet people half way as opposed to leaving them guessing.
If this is still an issue, please provide more details and debug logs.
@roshanmt I see you are using the CancellationToken in the consume method.
I am assuming there might be a code where it's cancelling the Token in the different thread in your code. The same code is passed in your Consume method which leads to Throwing the OperationCancellationException.