apache / rocketmq-client-go

Apache RocketMQ go client
https://rocketmq.apache.org/
Apache License 2.0
1.3k stars 419 forks source link

add new kind of primitive.NsResolver #1122

Open vearne opened 9 months ago

vearne commented 9 months ago

FEATURE REQUEST

When our team deploys the nameserver, the nameserver needs to use a domain name to access, so I need a resolver that can resolve DNS.

p, err := rocketmq.NewProducer(
    producer.WithNsResolver(primitive.NewDNSResolver([]string{"ns1.example.com:9876"})),
    producer.WithRetry(2),
)