Skip to content

increase flexibility of ConsumerOps #95

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

Merged
merged 2 commits into from
Nov 5, 2017

Conversation

lacarvalho91
Copy link
Contributor

@lacarvalho91 lacarvalho91 commented Oct 14, 2017

Addition of a ConsumerRetryConfig object for providing the number of attempts and poll duration implicitly when calling consumeLazily.

Some refactoring to allow one or many topics to be provided to consumeLazily instead of separate methods.

Allow a transform function to be passed to consumeLazily to be run on all ConsumerRecords consumed - allows users to decode a ConsumerRecord however they want (e.g. I've had times where I need to return the timestamp from a ConsumerRecord). This also means we can cover the use-case of the consumeLazilyOnTopics method which was extracting the topic from the ConsumerRecord.

I have provided some implementations of this function in Codecs which I believe to be common usages.

@manub
Copy link
Owner

manub commented Oct 17, 2017

Thanks @lacarvalho91 - I shall take a look at this in the next days.

@manub manub merged commit c057671 into manub:master Nov 5, 2017
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