Skip to content

Non-zero exit code in case of warnings #140

@mibollma

Description

@mibollma

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions