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

async producer not to circuit beak on partitioner errors #466

Closed
ssahukar opened this issue Jun 8, 2015 · 4 comments
Closed

async producer not to circuit beak on partitioner errors #466

ssahukar opened this issue Jun 8, 2015 · 4 comments
Labels

Comments

@ssahukar
Copy link

ssahukar commented Jun 8, 2015

If Partitioner.Partition() function returns an error, the circuit breaker breaks the circuit and drops some of the subsequent messages. I think Sarama should only drop the message for which partitioner returned an error and send that error to the application through the error channel.

In our application with a custom partitioner, we want to drop the messages that get produced with an invalid key, in which case the expected behavior is to drop only that message but to continue processing the other messages as usual, without a circuit break.

@wvanbergen
Copy link
Contributor

The reason the circuit breaker was added is the case of messages being produced to a topic that does not exists. This will fail very slowly, due to the fact that the error (UnknownTopicOrPartition) can also legitimately be temporary, so it needs to be retried.

So the circuit breaker was added, but we didn't really think of other use cases. Maybe we can fix the above problem in a better way.

@eapache
Copy link
Contributor

eapache commented Jun 9, 2015

@ssahukar this should be fixed in the latest master, if I understood you correctly

@ssahukar
Copy link
Author

ssahukar commented Jun 9, 2015

Thanks Evan.

I am following the discussion and it seems it would fix the issue I am
seeing.

Appreciate the quick turn around on this.

On 9 June 2015 at 11:28, Evan Huus [email protected] wrote:

@ssahukar https://github.com/ssahukar this should be fixed in the
latest master, if I understood you correctly


Reply to this email directly or view it on GitHub
#466 (comment).

@eapache eapache closed this as completed Jun 9, 2015
@helayzhang
Copy link

The reason the circuit breaker was added is the case of messages being produced to a topic that does not exists. This will fail very slowly, due to the fact that the error (UnknownTopicOrPartition) can also legitimately be temporary, so it needs to be retried.

So the circuit breaker was added, but we didn't really think of other use cases. Maybe we can fix the above problem in a better way.

@wvanbergen @eapache

I have met a problem recently. My kafka has disabled automatic topic creation, once a lot of illegal
messages try to write to a not exist topic, circuit breaker is soon opened, then other legal messages will be dropped also.

I'm confusing that in which case UnknownTopicOrPartition may be temporary, so we need circuit breaker to solve this? Hope you to help me understand this better, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants