wolfstudy commented on a change in pull request #566:
URL: https://github.com/apache/pulsar-client-go/pull/566#discussion_r670101426



##########
File path: pulsar/internal/connection.go
##########
@@ -744,6 +745,46 @@ func (c *connection) handleAuthChallenge(authChallenge 
*pb.CommandAuthChallenge)
        c.writeCommand(baseCommand(pb.BaseCommand_AUTH_RESPONSE, 
cmdAuthResponse))
 }
 
+func (c *connection) handleSendError(sendError *pb.CommandSendError, cmdError 
*pb.CommandError) {
+       c.log.Warnf("Received send error from server: [%v] : [%s]", 
sendError.GetError(), sendError.GetMessage())
+
+       requestID := cmdError.GetRequestId()
+       producerID := sendError.GetProducerId()
+
+       switch *sendError.Error {
+       case pb.ServerError_NotAllowedError:
+               c.pendingLock.Lock()

Review comment:
       > The java client closes the connection in the default case.
   > 
   > 
https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java#L649
   > 
   > Should we do the same. What should the expected client behavior be here?
   
   About this, Look at the comments like reconnect, look at the code like close 
the current connection:
   
   ```
               // By default, for transient error, let the **reconnection** 
logic
               // to take place and re-establish the produce again
               ctx.close();
   ```




-- 
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]


Reply via email to