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/11/01 07:13:32 UTC

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

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

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



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

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


   


-- 
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-client-go] wolfstudy commented on issue #553: [Reader] The topic not found when create reader with listener name

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


   And the java change is here: https://github.com/apache/pulsar/pull/9995
   


-- 
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-client-go] wolfstudy commented on issue #553: [Reader] The topic not found when create reader with listener name

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


   In here, when we create reader, we need to set the sub partition topic. for example:
   
   ```
   	reader, err := client.CreateReader(pulsar.ReaderOptions{
   		Topic:          "persistent://test-tenant/test-ns/test-topic-partition-0",
   		StartMessageID: pulsar.EarliestMessageID(),
   	})
   ```


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