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

Multiple topics subscription #57

Open
Gobonoid opened this issue Jul 5, 2018 · 2 comments
Open

Multiple topics subscription #57

Gobonoid opened this issue Jul 5, 2018 · 2 comments
Labels
v2 Feature request/discussion for pubsub V2

Comments

@Gobonoid
Copy link

Gobonoid commented Jul 5, 2018

Currently go-pubsub doesn't allow passing list of topics for single kafka consumer.

type MessageSourceConfig struct {
	ConsumerGroup            string
	Topic                    string
	Brokers                  []string
	Offset                   int64
	MetadataRefreshFrequency time.Duration
	Version                  *sarama.KafkaVersion
}

It would be nice if this would be

type MessageSourceConfig struct {
	ConsumerGroup  string
	Topic                    []string
	Brokers                 []string
	Offset                   int64
	MetadataRefreshFrequency time.Duration
	Version                  *sarama.KafkaVersion
}

@Gobonoid Gobonoid added the v2 Feature request/discussion for pubsub V2 label Jul 5, 2018
@aneshas
Copy link

aneshas commented Feb 9, 2019

Is this a relatively straightforward change as it looks since sarama cluster already takes a slice of strings for topics cluster.NewConsumer(mq.brokers, mq.consumergroup, []string{mq.topic}, config) ?

@mjgarton
Copy link
Contributor

The questions that come to mind are:

  1. Can this be done in a way that doesn't compromise the goals of go-pubsub (making all brokers "look" the same)
  2. If so, is the gain worth the effort and potential added complexity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Feature request/discussion for pubsub V2
Projects
None yet
Development

No branches or pull requests

3 participants