-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka Library Crashes when using ProducerConfig with SetLogHandler / SetErrorHandler #1834
Comments
this has been reported before. |
I have got following stacktrace on Ubuntu 22.10, 1.9.3 when using debugger.
|
Since this issue is going to be the main one for consumer
I've tested with: |
I've tested on Debian and Confluent.Kafka 2.3.0 with the same result. |
Description
When creating a ProducerConfig and your application is running containerized (using the default Dockerfile from VS 2022), when a log is generated and is passed to the API, the application just terminates. It even ignores the try-catch (maybe there is no exception being raised), the application just terminates.
How to reproduce
You can see it life in action here:![kafkaissue](https://user-images.githubusercontent.com/11208620/172879064-84100cb8-2342-4002-ae64-5f6fac9984e6.gif)
The offending code is the following
new ProducerBuilder<string, string>(producerConfig) .SetValueSerializer(new JsonSerializer<string>(schemaRegistry)) .SetLogHandler((_, message) => Console.WriteLine("I am a log")) .SetErrorHandler((_, error) => Console.WriteLine("I am an error")) .Build();
If you do NOT run it containerized, it will fail with expected behaviour.
Checklist
Please provide the following information:
The text was updated successfully, but these errors were encountered: