apache / rocketmq-client-go

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

HttpResolver snapshot file will be overwritten and mixed if multiple consumers or producers use different name server domains #1098

Closed twz915 closed 11 months ago

twz915 commented 11 months ago

HttpResolver use the same instance name "DEFAULT", so if multiple consumers or producers use different name server domains, the snapshot file will be overwritten and mixed. When the name server domain is unavailable, this can result in consumption or production to the wrong units.

resolver := NewHttpResolver("DEFAULT", nameServerDommain)

// this will change the instance name
dc.option.ChangeInstanceNameToPID()