Jroland / kafka-net

Native C# client for Kafka queue servers.
Apache License 2.0
482 stars 232 forks source link

Producer is increasing connection when sending 500 records after every 5 second #92

Open gargvicky opened 8 years ago

gargvicky commented 8 years ago

Hi,

I am using Kafka .net client and using producer to send 500 records in kafka topic.But each time in increase tcp connections and its stop working after 20-30 minutes due to large number of connection open.Is there any way for connection pooling or any other solution to reduce the connections

marcofranssen commented 8 years ago

This looks like IDisposable isn't called on connections not being used any more.

A ConnectionPool class indeed could keep track on used connections and reuse them whenever possible or recycle them (dispose) when not needed anymore.