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

Consumer with multiple topics #3

Open
mbuhot opened this issue Oct 23, 2016 · 1 comment
Open

Consumer with multiple topics #3

mbuhot opened this issue Oct 23, 2016 · 1 comment

Comments

@mbuhot
Copy link

mbuhot commented Oct 23, 2016

Hi and thanks for creating Cafex!

I'd like to have a consumer receive input from two or more topics to perform some stream joining, similar to how a samza job might be structured: (https://samza.apache.org/learn/documentation/0.9/container/state-management.html)

It looks like the underlying Kafka Fetch protocol supports multiple topics (https://github.com/upyun/cafex/blob/master/lib/cafex/protocol/fetch.ex#L10), but it is not surfaced in the Cafex consumer configuration API?

In the meantime, is the best alternative to start a consumer for each topic, and forward the messages to my own GenServer, which can maintain some state and produce the outputs?

Thanks again!

@belltoy
Copy link
Member

belltoy commented Oct 24, 2016

Yes, I'm afraid you're right.

According to the Kafka Protocol Guild, batching is a very significant performance win. Most of the APIs support batching across multiple topics. Cafex will support it, in one consumer.

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

2 participants