IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.59k stars 1.76k forks source link

Latency increased after some time using sync publisher. #2970

Open FelipeMandelli opened 3 months ago

FelipeMandelli commented 3 months ago
Description

After using an initialized publisher for a while, the time to publish messages increases by 10x.

I'm using a synchronous producer to send messages between services.

When the application starts, it takes about 1ms to 10ms (sometimes even less than 1ms) to publish a message. However, after 30 to 40 minutes, this time suddenly jumps to 100ms to 200ms.

I'm using the same initialized instance of the producer.

I've tried adding the keep-alive configuration to the publisher and set it to 240 minutes, but the result was the same.

I have also updated the Sarama version to 1.43.3.

Additionally, I have tested this behavior on both AWS MSK and an internal Kafka broker, and both exhibited the same issue.

Versions
Sarama Kafka Go
1.43.3 1.18
Configuration
RequiredAcks: 1 
KeepAlive: 240 minutes
Logs
logs: CLICK ME

``` ```

Additional Context
github-actions[bot] commented 1 week ago

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.