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

Allow passing extra args to GenConsumer.init/3 #337

Merged
merged 1 commit into from
Feb 23, 2019

Conversation

mtrudel
Copy link
Contributor

@mtrudel mtrudel commented Feb 6, 2019

Allow for extra arguments to be passed in as part of GenConsumer initialization, to avoid race conditions inherent in passing initial state information via handle_call.

The value of the extra_consumer_args option passed into GenConsumer.start_link/5 is passed to GenConsumer.init/3 as its third argument. The default implementation of this function ignores this parameter and simply calls GenConsumer.init/2 to ensure backwards compatibility.

@sourcelevel-bot
Copy link

Hello, @mtrudel! This is your first Pull Request that will be reviewed by Ebert, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

Copy link
Member

@joshuawscott joshuawscott left a comment

Choose a reason for hiding this comment

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

👍 looks good to me; works with existing apps without any warnings that I saw.

@joshuawscott joshuawscott merged commit d9728ae into kafkaex:master Feb 23, 2019
@joshuawscott joshuawscott mentioned this pull request Apr 11, 2019
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