crossoverJie commented on code in PR #1220: URL: https://github.com/apache/pulsar-client-go/pull/1220#discussion_r1602683540
########## pulsar/consumer_partition.go: ########## @@ -411,13 +411,13 @@ func newPartitionConsumer(parent Consumer, client *client, options *partitionCon return pc, nil } -func (pc *partitionConsumer) Unsubscribe() error { +func (pc *partitionConsumer) unsubscribe(force bool) error { if state := pc.getConsumerState(); state == consumerClosed || state == consumerClosing { pc.log.WithField("state", state).Error("Failed to unsubscribe closing or closed consumer") - return nil + return errors.New("consumer state is closed") Review Comment: Keep consistent with here: https://github.com/apache/pulsar/blob/f3e52b568ec7e86e7582bdc425321fe172bc4deb/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java#L573-L576 -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org