Open lixiandai opened 6 years ago
thanks @lixiandai - noted. see also #449.
@mhowlett thanks for the quick replay. could you give us a timeline when this fix will be able to merged back into 0.11.4 nuget package?
@mhowlett I am facing the same issue calling RegisterSchemaAsync. I have upgraded to 1.0-Experiential-7 of Confluent.Kafka, Confluent.Kafka.Avro and Confluent.SchemaRegistry. I'm producing the kafka event from web api on each request. I have async method which calls producer.ProduceAsync. I'm getting following error: "message": "An error has occurred.", "exceptionMessage": "A task was canceled.", "exceptionType": "System.Threading.Tasks.TaskCanceledException",
I have tried adding ConfigureAwait(false) to producer.ProduceAsync. Still no luck.
Could you please tell me what could be the issue?
If you use the AvroSpecific example which is console app it works fine.
thanks for the confirming this is still an issue @ravi-sontale. we merged some work towards resolving this, but didn't finish / test. Are you experiencing this issue in a WindowsForms app? when testing?
I am facing this issue when I’m trying to produce event from .net web api.
Is this still an issue?
Description
Confluent.SchemaRegistry/Rest/RestService.cs file
changed to
Confluent.SchemaRegistry/CachedSchemaRegistryClient.cs file Line 169
schemaId = restService.RegisterSchemaAsync(subject, schema).Result;
changed to
schemaId =restService.RegisterSchemaAsync(subject,schema).ConfigureAwait(false).GetAwaiter().GetResult();
How to reproduce
I am facing some deadlock issue when calling restService.RegisterSchemaAsync(subject, schema). By looking into this http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html Seems we should use ConfigureAwait(false) as much as possible in the aysc code pipeline.
Since the permission issue i am not able to open a pull request for the issue i am facing, so have to attach the code change we made locally to make the deadlock gone.
Checklist
Please provide the following information: