Status

Current stateUnder Discussion

Discussion thread: here

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Currently, ConsoleConsumer does not allow a negative offset to support `tail -n` feature. However, it's convenient to quickly check the last N messages for a partition when debugging. 

For better user experience, it would be nice to add `tail -n` capability for ConsoleConsumer.

Public Interfaces

None.

Proposed Changes

Currently, three valid types of values for `offsets` option in ConsoleConsumer include:

To support `tail -n`, a fourth valid type of value is added:

Similar to `tail -n`, the consumer will seek to the earliest offset if an extremely small negative value is specified.

Compatibility, Deprecation, and Migration Plan

None.

Rejected Alternatives

None.