agzou opened a new issue #649:
URL: https://github.com/apache/rocketmq-client-go/issues/649


   In K8S environment, I use DNS to replace the IP address as the address of 
name server, for example:``` namesrv-0.namesrv-service.rocketmq: 9876; 
namesrv-1.namesrv-service.rocketmq: 9876```, but I read the code, name server 
address must be in the format of an ip address? ``` 
namesrv-0.namesrv-service.rocketmq: 9876; namesrv-1.namesrv-service.rocketmq: 
9876```,it can work in java client
   ```go
   func main(){
        addr, err := 
primitive.NewNamesrvAddr("namesrv-0.namesrv-service.rocketmq:9876;namesrv-1.namesrv-service.rocketmq:9876")
        if err != nil {
                log.Fatal(err)
        }
        rp, err := rocketmq.NewProducer(producer.WithNameServer(addr))
        if err != nil {
                log.Fatalf("Can not start rocketmq producer:%v", err)
        }
        err = rp.Start()
   }
   ```


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


Reply via email to