Comments (5)
From what I recall of the design, and from a cursory look at the code, there is only ever one single thread per Producer that is in SendLoop() (each Producer instance has one sender thread). It is also normal for a producers send thread to wait on that event if there are no messages to send.
How many producers are being created by serilog-sinks-kafka? Can you verify the number of Producer instances? In general, you should share a single producer instance across the application (or at least major subsystem of the application). This may very well be an issue with serilog-sinks-kafka. We are using kafka4net heavily from IIS for logging many events, and see none of this issue.
from kafka4net.
a 5 minute look at serilog-sinks-kafka (I don't know serilog, or how many of these KafkaClient
objects are created, but their method GetOrCreateKafkaProducerAsync does NOT perform double-check-locking and has a very possible race condition allowing many producers to be created.
from kafka4net.
Thank you for explanation! I will verify the number of Producer instances created by serilog-sinks-kafka.
And just for the sake of interest what about infinite wait timeout?
from kafka4net.
Yep, double-check-locking in serilog-sinks-kafka source code in GetOrCreateKafkaProducerAsync with some other minor modifications helped to solve this problem. Thank you again.
from kafka4net.
Great Glad to hear it.
from kafka4net.
Related Issues (20)
- How to start consuming with a specific offset. HOT 6
- Producer throws exception when sending a lot of messages HOT 3
- Memory leak HOT 19
- Closing and opening connection right after, throws exception
- Producer starts writing to the same single partition (when no Message.Key is specified) HOT 1
- Producer stops working after manual partition reassignment HOT 5
- Memory leak in producer HOT 1
- ObjectDisposedException after closing producer HOT 6
- Sample consumer code for multi-topic subscription HOT 2
- How should I handle the situation when Kafka starts re-balancing data on brokers. HOT 4
- Implement protocol v1 and v2 (aka kafka-0.9 and 0.10) HOT 3
- Better backward comptibility when enhancing configuration classes
- Upgrade to System.Reactive 3 HOT 2
- Consumer flow control is broken HOT 2
- Consumer subscription to messages lost HOT 4
- Idle Connections getting closed are logged as Error
- Cannot configure Tcp Keepalive HOT 1
- Use RecyclableMemoryStream instead of MemoryStream HOT 4
- Upgrade to System.Reactive 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka4net.