merlimat opened a new pull request #11804: URL: https://github.com/apache/pulsar/pull/11804
### Motivation When a producer is getting error because of ProducerBusy (existing producer with the same name), it will trigger a producer close operation that will eventually lead to the existing producer getting removed from the topic map (even though that producer is still writing on the topic). The problem is the producer close is triggering a removal from the map: https://github.com/apache/pulsar/blob/43ded5927fb78add69196b46c1edc36bde77af0e/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L683 Even though we check for producer equality, the `Producer.equals()` is only comparing the producer name, so the old instance gets removed from the map. Instead, the equality of producer needs to be based on the connection id (local & remote addresses and unique id), plus the producer id within that connection. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
