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/06/28 03:17:00 UTC

[GitHub] [pulsar] wolfstudy opened a new issue #11122: [Reader] The topic not found when create reader with listener name

wolfstudy opened a new issue #11122:
URL: https://github.com/apache/pulsar/issues/11122


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


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] wolfstudy closed issue #11122: [Reader] The topic not found when create reader with listener name

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #11122:
URL: https://github.com/apache/pulsar/issues/11122


   


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] wolfstudy commented on issue #11122: [Reader] The topic not found when create reader with listener name

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #11122:
URL: https://github.com/apache/pulsar/issues/11122#issuecomment-869313735


    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: commits-unsubscribe@pulsar.apache.org

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