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

producer: wrap partitioning in a circuit-breaker #373

Merged
merged 1 commit into from
Mar 19, 2015

Conversation

eapache
Copy link
Contributor

@eapache eapache commented Mar 19, 2015

This prevents repeatedly broken topics (e.g. ones that don't even exist) from
choking throughput for other topics.

@Shopify/kafka

No tests because:

This prevents repeatedly broken topics (e.g. ones that don't even exist) from
choking throughput for other topics.
@@ -265,10 +265,13 @@ func (p *asyncProducer) topicDispatcher() {
func (p *asyncProducer) partitionDispatcher(topic string, input chan *ProducerMessage) {
handlers := make(map[int32]chan *ProducerMessage)
partitioner := p.conf.Producer.Partitioner(topic)
breaker := breaker.New(3, 1, 10*time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a bunch of circuit breakers with hard-coded settings now. Should we make the circuit breaker options available in the Config struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"a bunch" is 2, and they currently have the same settings. We might want to expose those parameters, I'm not sure if anybody really actually cares to tweak them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In other words, I just don't care to do that work until somebody actually wants or needs it.

@wvanbergen
Copy link
Contributor

LGTM.

eapache added a commit that referenced this pull request Mar 19, 2015
producer: wrap partitioning in a circuit-breaker
@eapache eapache merged commit 5ca5e10 into master Mar 19, 2015
@eapache eapache deleted the circuitbreak-partitioning branch March 19, 2015 21:16
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