Skip to content

Conversation

@garyrussell
Copy link
Contributor

Resolves #960

When the container is configured with AckMode.MANUAL_IMMEDIATE, the
SeekToCurrentErrorHandler can be configured to commit the offset of
a recovered record.

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just only one polishing concern.
Otherwise the feature is cool.
I just haven't figured how to answer to that SO question...

commitCallback = LOGGING_COMMIT_CALLBACK;
}
consumer.commitAsync(Collections.singletonMap(new TopicPartition(record.topic(), record.partition()),
new OffsetAndMetadata(record.offset() + 1)), commitCallback);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like TopicPartition and OffsetAndMetadata could be extracted as variables before if..else. We are going to use them in both cases anyway.

Resolves spring-projects#960

When the container is configured with `AckMode.MANUAL_IMMEDIATE`, the
`SeekToCurrentErrorHandler` can be configured to commit the offset of
a recovered record.
@artembilan artembilan merged commit 7edf9f4 into spring-projects:master Feb 13, 2019
@garyrussell garyrussell deleted the GH-960 branch February 13, 2019 01:27
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

Successfully merging this pull request may close these issues.

2 participants