bugCats opened a new issue, #6827:
URL: https://github.com/apache/rocketmq/issues/6827

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   Linux centos7 version 3.10.0-514.6.2.el7.x86_64
   
   ### RocketMQ version
   
   5.1.1
   
   ### JDK Version
   
   1.8.0_11
   
   ### Describe the Bug
   
   二副本对等部署情况下,返回TopicRouteData:broker.endpoints.addresses端口错误。
   
   ### Steps to Reproduce
   
   我有2台服务器甲、乙;
   服务器甲部署:a0、b1节点,外网IP配置的域名:shiji.rmq;服务器乙部署:b0、a1节点,外网IP配置的域名:hsjl.rmq;
   这些域名都是自定义,需要在客户端上修改hosts文件。
   
   <pre>
   a0 broker.conf:
   brokerIP1=shiji.rmq
   brokerIP2=172.17.88.54
   
   b1 broker.conf:
   brokerIP1=shiji.rmq
   brokerIP2=172.17.88.54
   
   b0 broker.conf:
   brokerIP1=hsjl.rmq
   brokerIP2=172.17.88.57
   
   a1 broker.conf:
   brokerIP1=hsjl.rmq
   brokerIP2=172.17.88.57
   
   </pre>
   
   | - | 域名 | proxy端口 | broker端口 |
   |---|---|---|---|
   |a0| shiji.rmq | 15872| 15877|
   |b1| shiji.rmq | 15862| 15867|
   |b0| hsjl.rmq | 15852| 15857|
   |a1| hsjl.rmq |15842| 15847|
   
   
   
   客户端使用文档中示例代码:
   `String endpoints = 
"shiji.rmq:15872;shiji.rmq:15862;hsjl.rmq:15852;hsjl.rmq:15842";`
   
   返回的**TopicRouteData**
   <pre>
         ......
             {
                  "acceptMessageTypes": [
                       "NORMAL"
                  ],
                  "broker": {
                       "endpoints": {
                            "addresses": [
                                 {
                                      "address": "hsjl.rmq:15852",
                                      "host": "hsjl.rmq",
                                      "port": 15852
                                 }
                            ],
                            "facade": "ipv4:hsjl.rmq:15852",
                            "grpcTarget": "ipv4:hsjl.rmq:15852",
                            "scheme": "IPv4"
                       },
                       "id": 0,
                       "name": "broker-b"
                  },
                  "permission": "READ_WRITE",
                  "queueId": 31,
                  "topic": "standardQueue",
                  "topicResource": {
                       "name": "standardQueue",
                       "namespace": ""
                  }
             },
             {
                  "acceptMessageTypes": [
                       "NORMAL"
                  ],
                  "broker": {
                       "endpoints": {
                            "addresses": [
                                 {
                                      "address": "shiji.rmq:15852",
                                      "host": "shiji.rmq",
                                      "port": 15852
                                 }
                            ],
                            "facade": "ipv4:shiji.rmq:15852",
                            "grpcTarget": "ipv4:shiji.rmq:15852",
                            "scheme": "IPv4"
                       },
                       "id": 1,
                       "name": "broker-b"
                  },
                  "permission": "READ_WRITE",
                  "queueId": 0,
                  "topic": "standardQueue",
                  "topicResource": {
                       "name": "standardQueue",
                       "namespace": ""
                  }
             }
           ......
             {
                  "acceptMessageTypes": [
                       "NORMAL"
                  ],
                  "broker": {
                       "endpoints": {
                            "addresses": [
                                 {
                                      "address": "shiji.rmq:15852",
                                      "host": "shiji.rmq",
                                      "port": 15852
                                 }
                            ],
                            "facade": "ipv4:shiji.rmq:15852",
                            "grpcTarget": "ipv4:shiji.rmq:15852",
                            "scheme": "IPv4"
                       },
                       "id": 0,
                       "name": "broker-a"
                  },
                  "permission": "READ_WRITE",
                  "queueId": 31,
                  "topic": "standardQueue",
                  "topicResource": {
                       "name": "standardQueue",
                       "namespace": ""
                  }
             },
             {
                  "acceptMessageTypes": [
                       "NORMAL"
                  ],
                  "broker": {
                       "endpoints": {
                            "addresses": [
                                 {
                                      "address": "hsjl.rmq:15852",
                                      "host": "hsjl.rmq",
                                      "port": 15852
                                 }
                            ],
                            "facade": "ipv4:hsjl.rmq:15852",
                            "grpcTarget": "ipv4:hsjl.rmq:15852",
                            "scheme": "IPv4"
                       },
                       "id": 1,
                       "name": "broker-a"
                  },
                  "permission": "READ_WRITE",
                  "queueId": 0,
                  "topic": "standardQueue",
                  "topicResource": {
                       "name": "standardQueue",
                       "namespace": ""
                  }
             },
   ......
   </pre>
   
   
   
   ### What Did You Expect to See?
   
   a0,部署在甲服务器上,应该是`shiji.rmq:15872`;
   b1,部署在甲服务器上,应该是`shiji.rmq:15862`;
   b0,部署在乙服务器上,应该是`hsjl.rmq:15852`;
   a1,部署在乙服务器上,应该是`hsjl.rmq:15842`;
   
   
   ### What Did You See Instead?
   
   实际返回结果:
   a0:shiji.rmq:15852,
   b1:shiji.rmq:15852,
   b0:hsjl.rmq:15852,
   
   ### Additional Context
   
   _No response_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to