Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-zero exit code in case of warnings #140

Open
mibollma opened this issue Jul 6, 2023 · 0 comments
Open

Non-zero exit code in case of warnings #140

mibollma opened this issue Jul 6, 2023 · 0 comments

Comments

@mibollma
Copy link

mibollma commented Jul 6, 2023

I think it would be useful to return a non-zero exit code in case kt encountered a warning while reading data from topics either by default or only when enabled with an additional flag.

In my specific case while I am reading topic partition offsets I sometimes encounter warnings such as

failed to read info for topic ***. err=kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes.
Source

In that case the topic is skipped and the data for this topic is missing in the result.
If kt would return a non-zero exit code I could retry a few times with some delay until hopefully the leadership election is done.

@fgeller I can offer to give the implementation a shot if there is general interest to merge such a feature into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant