dehora / nakadi-java

🌀 Client library for the Nakadi Event Broker (examples: http://bit.ly/njc-examples, site: https://dehora.github.io/nakadi-java/)
MIT License
30 stars 19 forks source link

[Support] Retrying done even in case of 4xx error #384

Open samizzy opened 1 year ago

samizzy commented 1 year ago

I would like to understand the use case for which nakad-java client retries publishing even in case of 4xx errors.

Is this so that a publisher can keep retrying publishing calls until it succeeds? This can be happen if the publisher/owner of event type observes the status codes for publish requests and fixes the event type (auth, schema etc) in time before retry policy expires so the failed calls can succeed. If not then this will just lead to meaning less calls to nakadi which nakadi will always reject, it occupies resources from client as well as from nakadi side.

samizzy commented 1 year ago

seems like 422 (atleast one event failed validation) is excluded from retrying so the scenario I described is reduced to 401/403