Open omercelikceng opened 2 years ago
@omercelikceng Is this issue still valid for your use case? I wonder if there is any more info that you can add.
@sobychacko I can't remember this topic exactly. However, I think this situation still continues. If I have a free time, I will review it and open a pull request. But I'm busy these days. I need some time.
@omercelikceng No problem. Please let us know how you want to continue.
Hello, I am getting an error as below. This may not be an error. Because the bind method is called again and maybe the error will not be thrown again. That's why I want to give a suggestion about it.
Hello, I am getting an error as below in my project. I know I got this error because kafka's metadata has not been updated yet. Even though the Topic partition is 8, I am getting this error because the createPartitions(8) method is called. When I examine it, I get this error in the code block below.
Then it enters the code in the next image and tries to bind the producer again. But when I try again, the transactions will complete successfully. I didn't need to write the error log here. I think the error log here is misinforming the developer.
I have a few suggestions.
I would like to briefly summarize the example problem again. Actually, a topic's partition is 8. However, when this information is pulled from metadata, it comes as 1. That's why the createPartition method is called and kafka throws InvalidPartitionsException. Then this error is thrown. And the bind producer method is called again in the catch method.
My first recommendation: This log should be removed. The developer thinks it's a bug. However, there is a chance that this error will go away when it tries again.
My second suggestion: Let's add a retry mechanism to the code below. Let's throw it only if the retry fails as a result.
If one of my suggestions is accepted, I would like to send a pull request.