You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…5571)
Fixes#5535
Motivation
Currently, if user create producer timeout, the connection handler of producer will reconnect to the broker later, but if in broker already done the previous create producer request, the reconnection will failed with "producer with name xxx is already connected".
So this PR will introduce epoch for connection handler and add a field named isGeneratedName for producer to handle above problem.
This PR only handle the generated producer name scenario, so many users occur errors such like
#5535, so we need to fix the generated producer name scenario first.
For the scenario of user specified producer name, we can discuss later and find a simple approach to handle it, i left my idea here: using producer id and producer name as the identity of producer, producer name used for EO producer and producer id can used by the producer reconnect, but this approach depends on globally unique producer id generator.
Modifications
If the producer with generated producer name and epoch of the producer is bigger than the exists producer, the new producer will overwrite the old producer, so the reconnect producer will create succeed.
Verifying this change
Add unit tests to simulate producer timeout and reconnection
Client timed out while trying to send message to brokers, and failed to add producer to topic. Below are related logs.
connection closed log:
client log:
broker log:
The text was updated successfully, but these errors were encountered: