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

Add a Consumer API without groups #168

Closed
dasch opened this issue Apr 27, 2016 · 1 comment
Closed

Add a Consumer API without groups #168

dasch opened this issue Apr 27, 2016 · 1 comment

Comments

@dasch
Copy link
Collaborator

dasch commented Apr 27, 2016

The Kafka Offset API allows un-grouped consumers. It may make sense for some use cases.

From the protocol spec:

Note that when this API is used for a "simple consumer," which is not part of a consumer group, then the generationId must be set to -1 and the memberId must be empty (not null). Additionally, if there is an active consumer group with the same groupId, then the commit will be rejected (typically with an UNKNOWN_MEMBER_ID or ILLEGAL_GENERATION error).

The thing is, for offset commits to work you still need a group id. I'm not sure what a nice API would look like.

@dasch
Copy link
Collaborator Author

dasch commented Jun 16, 2016

Added an experimental API to master:

kafka = Kafka.new(...)

kafka.each_message(topic: "greetings") do |message|
  ...
end

It doesn't do checkpointing – I'm not sure if it makes sense to add it, as you might as well use a consumer group at that point.

@dasch dasch closed this as completed Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant