richzhu369 opened a new issue, #1143:
URL: https://github.com/apache/rocketmq-client-go/issues/1143

   can not create topic when i use rocketmq-client-go v2
   
   ```go
   import (
        "context"
        "fmt"
        "github.com/apache/rocketmq-client-go/v2/admin"
        "github.com/apache/rocketmq-client-go/v2/primitive"
        "github.com/gin-gonic/gin"
        "log"
        "net/http"
        "strings"
   )
   
   func CreateTopic(c *gin.Context) {
        endPoint := []string{"18.163.92.55:9876"}
        topicName := "RichTestTopic"
        // 创建主题
        // 先连接远程的服务器,得到一个具柄testAdmin,然后利用该具柄创建CreateTopic()创建topic
        testAdmin, err := 
admin.NewAdmin(admin.WithResolver(primitive.NewPassthroughResolver(endPoint)))
        // 检查是否连接成功
        if err != nil {
                fmt.Printf("connection error: %s\n", err.Error())
        }
        err = testAdmin.CreateTopic(context.Background(),
                admin.WithTopicCreate(topicName))
        // 检查是否创建topic失败
        if err != nil {
                fmt.Printf("createTopic error: %s\n", err.Error())
        }
   }
   ```
   
   always show error:
   ```text
   ERRO[0001] create topic error                            broker= 
topic=RichTestTopic underlayError="dial tcp: missing address"
   ```


-- 
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-unsubscr...@rocketmq.apache.org.apache.org

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

Reply via email to