poorbarcode commented on code in PR #24178:
URL: https://github.com/apache/pulsar/pull/24178#discussion_r2057596977
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -1231,7 +1246,10 @@ public boolean isConnected() {
* verify that the returned cnx is not null before using reference.
*/
protected ClientCnx getCnxIfReady() {
- if (getState() == State.Ready) {
+ State state = getState();
+ // When a producer is publishing with multiple schema, it may be
switched to a "RegisteringSchema" state, even
+ // if the connection is established.
+ if (State.Ready.equals(state) ||
State.RegisteringSchema.equals(state)) {
Review Comment:
Main change 4:
- A producer is registering the second schema, its state is
`RegisteringSchema`, when we call `producer.isConnected`, it returns `false`,
but it was shown in `pulsar-admin topics stats <topic>`'s `producers`
--
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]