You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code below was executed while kafka service was shut down. No failure is returned, promise was fulfilled and on_success has been called which seems wrong!
request.required.acks and producer.mode (sync or async) are orthogonal
configs, i.e. with async mode, the producer.send() call itself will not be
blocking on acks from the servers, but its async sending thread will still
be blocked for acks, and if it fails to send out the messages due to, say,
timing out on the acks, the sender will record the failures in the metrics.
So if you want your application to be paused or directly notified upon such
sending failures you probably should use sync, if your application do not
need to be paused, but just be monitored on such failure metrics you can
use async. Which acks value to use is then based on how much you want your
message to be persistent by trading latency.
Guozhang
I see. So basically using async producer there only way to get information about failures would be to access metrics those metrics. Would it make sense to expose a hermann API so metrics can be retrieved in the same way irrespective of whether the java lib or librdkafka is used?
@phrinx I think it would be feasible to expose those metrics in a sane way, but it's a non-trivial amount of work that I know we haven't looked too deeply into it yet.
How critical/important is the async usecase for your work right now?
I believe this issue is not very critical to me atm. For the time being I will instead use 'sync' producer mode with only registering callbacks for #on_success and #on_error on the promise returned by #push such that I get callback in case of error (which won't be the case in async mode due to this issue).
I understand that with this model I could silently loose messages in case of server shutdowns etc but that's an acceptable case for my application.
This code below was executed while kafka service was shut down. No failure is returned, promise was fulfilled and on_success has been called which seems wrong!
The text was updated successfully, but these errors were encountered: