grepplabs / kafka-proxy

Proxy connections to Kafka cluster. Connect through SOCKS Proxy, HTTP Proxy or to cluster running in Kubernetes.
Apache License 2.0
488 stars 83 forks source link

Drain connections before shutdown #133

Open jutley opened 1 year ago

jutley commented 1 year ago

When using kafka-proxy as a Kubernetes pod sidecar container, the main application may need to send data to Kafka during its graceful shutdown period. However, kafka-proxy closes very quickly, terminating any live connections that are open.

It would be great to be able to configure kafka-proxy so that it doesn't terminate until all existing connections are closed. This would probably need some configurable timeout as well.