Open timbunce opened 4 years ago
What version are you using?
Have you acknowledged all consumed messages before stopping? Alternatively you could have used auto_ack=true when consuming. Before stopping kafka-pixy
waits for acknowledgments of consumed messages for proxies.\<proxy-name>.consumer.ack_timeout which is 5 minutes by default.
What version are you using?
v0.17.0
Before stopping kafka-pixy waits for acknowledgments of consumed messages for proxies.
.consumer.ack_timeout which is 5 minutes by default.
That seems like a long time for a process to wait after a SIGTERM (especially without logging an explanatory message).
I'd expect kafka-pixy to stop promptly, dropping the connection, and for the client's Ack to fail with a gRPC error so the client would know the Ack didn't succeed.
What does "before retrying" mean in this context:
# Period of time that Kafka-Pixy should wait for an acknowledgement
# before retrying.
ack_timeout: 5m
That seems like a long time for a process to wait after a SIGTERM (especially without logging an explanatory message).
If kafka-pixy
stops immediately that would result in unacknowledged messages to be offered to another client later, possibly by another kafka-pixy
instance, hence it is advisable to set this parameter to be greater than the longest it takes to handle your messages.
What does "before retrying" mean in this context:
It means that if a message is not acknowledged in ack_timeout
time, it will be offered by kafka-pixy
again.
Thanks for the explanation. I agree it's working as designed.
My suggested changes are:
ack_timeout
comments by explaining the effect, both on messages and on shutdown. ack_timeout
log a message to that effect.I agree with the first two suggestions, however we will not implement the third, because a user have an option to auto ack consumed messages.
Pixy hangs on shutdown after being used. In our case it's a single client connected to a single topic with a single partition, which produced and consumed a few messages.
Two example logs. First was SIGINT the second was SIGTERM, in case it matters.