wolfstudy opened a new issue #553:
URL: https://github.com/apache/pulsar-client-go/issues/553
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
```
package main
import (
"context"
"fmt"
"log"
"github.com/apache/pulsar-client-go/pulsar"
)
func main() {
client, err := pulsar.NewClient(pulsar.ClientOptions{
URL: "pulsar://localhost:6000",
ListenerName: "custom:xxxx/vpc-xxxxxx/subnet-xxxxxx",
Authentication:
pulsar.NewAuthenticationToken("eyJrZxxxxxxxxxxx"),
})
if err != nil {
log.Fatal(err)
}
defer client.Close()
reader, err := client.CreateReader(pulsar.ReaderOptions{
Topic: "persistent://test-tenant/test-ns/test-topic",
StartMessageID: pulsar.EarliestMessageID(),
})
if err != nil {
log.Fatal(err)
}
defer reader.Close()
for reader.HasNext() {
msg, err := reader.Next(context.Background())
if err != nil {
log.Fatal(err)
}
fmt.Printf("Received message msgId: %#v -- content: '%s'\n",
msg.ID(), string(msg.Payload()))
}
}
```
**Expected behavior**
We can create the reader successfully
**Screenshots**
<img width="1271" alt="bdcb83d8-758d-4545-91f8-3ba1ac7685a7"
src="https://user-images.githubusercontent.com/20965307/123574245-15127f00-d802-11eb-88c7-8190742154df.png">
**Desktop (please complete the following information):**
- OS: Mac OS
- Go Version: master
---
But this topic already exists, it is normal to use producer or consumer
--
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]