diff --git a/pulsar/internal/connection.go b/pulsar/internal/connection.go index 6ca462e745..35b65cd8fd 100644 --- a/pulsar/internal/connection.go +++ b/pulsar/internal/connection.go @@ -502,6 +502,9 @@ func (c *connection) writeCommand(cmd *pb.BaseCommand) { panic("Protobuf serialization error") } + // log the command before sending to broker, it will be helpful for debugging in case of issues + c.log.Debugf("Writing command: %v", cmd) + c.writeBuffer.WrittenBytes(cmdSize) c.internalWriteData(c.writeBuffer) }