You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/14 04:55:04 UTC

[GitHub] [pulsar-client-go] EAHITechnology commented on a change in pull request #517: Check ParseTopicName() return err

EAHITechnology commented on a change in pull request #517:
URL: https://github.com/apache/pulsar-client-go/pull/517#discussion_r632280079



##########
File path: pulsar/producer_impl.go
##########
@@ -88,12 +88,17 @@ func newProducer(client *client, options *ProducerOptions) (*producer, error) {
 		options.BatchingMaxPublishDelay = defaultBatchingMaxPublishDelay
 	}
 
+	ms, err := client.metrics.GetTopicMetrics(options.Topic)

Review comment:
       The CreateProducer() passes an unchecked topic.And then use GetTopicMetrics() func (Use ParseTopicName func but uncheck err. When use as object transfer internal members ,you will get a runtime panic)




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org