archfish commented on a change in pull request #128: fix requestID using
consumerID && loopclosure issue && add old style topic support
URL: https://github.com/apache/pulsar-client-go/pull/128#discussion_r359168104
##########
File path: pulsar/internal/topic_name.go
##########
@@ -44,9 +44,10 @@ func ParseTopicName(topic string) (*TopicName, error) {
if !strings.Contains(topic, "://") {
// The short topic name can be:
// - <topic>
- // - <property>/<namespace>/<topic>
+ // - <tenant>/<namespace>/<topic>
+ // - <tenant>/<cluster>/<namespace>/<topic>
parts := strings.Split(topic, "/")
- if len(parts) == 3 {
+ if len(parts) == 3 || len(parts) == 4 {
Review comment:
```log
Running tool: /usr/local/bin/go test -timeout 30s
github.com/apache/pulsar-client-go/pulsar/internal -run ^(TestParseTopicName)$
ok github.com/apache/pulsar-client-go/pulsar/internal 0.559s
Success: Tests passed.
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services