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

Specifying multiple topic #52

Open
eugenemiretsky opened this issue May 9, 2016 · 1 comment
Open

Specifying multiple topic #52

eugenemiretsky opened this issue May 9, 2016 · 1 comment

Comments

@eugenemiretsky
Copy link

Would it make sense to allow passing a Map of <Topic, Stream #> to create a consumer for multiple topics?
It's currently possible to do that by passing a TopicFilter, but it would be nice to have controlle over the number of streams for each topic

@sclasen
Copy link
Owner

sclasen commented May 9, 2016

pretty easy in userspace, if I understand your approach?

val props : AkkaConsumerProps[K,V] = ???
val topicStreams : Map[String,Int] = ???

val consumers = topicStreams.map{
  case (t, s) => 
      val prop = props.copy(topicFilterOrTopic = Right(t), streams=s)
      val consumer = new AkkaConsumer(prop)
      (t, consumer)
}

happy to take a PR that makes this easier if you have something in mind.

Cheers!

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

No branches or pull requests

2 participants