You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "WSYwsy22 (via GitHub)" <gi...@apache.org> on 2023/03/07 03:49:39 UTC

[GitHub] [rocketmq] WSYwsy22 opened a new pull request, #6262: fix rocketmq-proxy does not work properly in k8s nodePort mode

WSYwsy22 opened a new pull request, #6262:
URL: https://github.com/apache/rocketmq/pull/6262

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
     When deploying rocketmq in self-built k8s, if nodePort is used, if the port of nodePort is inconsistent with the port of proxy grpcServerPort, it will result in failure to obtain information normally from rocketmq-proxy
     This submission is to use the port that the addressList adds to address as the port that the user connects to endPoint, so that it can work compatible with the nodePort of k8s
   
   <!--
   If this PR fixes a GitHub issue, please add `fixes #<XXX>` or `closes #<XXX>`. Please refer to the documentation for more information:
   https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
   -->
   
   ## Brief changelog
   change RouteActivity#convertToAddressList
   
   
   ## Verifying this change
   You can compare the changed versions before and after. Build a k8s cluster by yourself, deploy a rocketmq cluster in it, use the nodePort mode of k8s, keep the port of nodePort mode different from the proxy grpcServerPort, and try to send and receive messages to verify
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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

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


[GitHub] [rocketmq] WSYwsy22 commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1133587101


##########
proxy/src/test/java/org/apache/rocketmq/proxy/config/ConfigurationManagerTest.java:
##########
@@ -24,12 +24,6 @@
 
 public class ConfigurationManagerTest extends InitConfigTest {
 
-    @Test
-    public void testInitEnv() {
-        // configure proxy home by system env.
-        assertThat(ConfigurationManager.getProxyHome()).isEqualTo(mockProxyHome);
-    }
-

Review Comment:
   Is there a mistake here? I can't pass this if I add this to the Bazel complie test.



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

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


[GitHub] [rocketmq] codecov-commenter commented on pull request #6262: fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#issuecomment-1457497119

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#6262](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3664dcc) into [develop](https://codecov.io/gh/apache/rocketmq/commit/236d4a164e4ba0a6d1d5db4c25225224ab206c5e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (236d4a1) will **increase** coverage by `0.04%`.
   > The diff coverage is `33.33%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #6262      +/-   ##
   =============================================
   + Coverage      43.17%   43.22%   +0.04%     
   - Complexity      8849     8853       +4     
   =============================================
     Files           1094     1094              
     Lines          77192    77191       -1     
     Branches       10068    10068              
   =============================================
   + Hits           33331    33364      +33     
   + Misses         39691    39648      -43     
   - Partials        4170     4179       +9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rg/apache/rocketmq/common/message/MessageType.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vbWVzc2FnZS9NZXNzYWdlVHlwZS5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...he/rocketmq/proxy/grpc/v2/route/RouteActivity.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2dycGMvdjIvcm91dGUvUm91dGVBY3Rpdml0eS5qYXZh) | `91.89% <100.00%> (-0.06%)` | :arrow_down: |
   | [...controller/impl/DefaultBrokerHeartbeatManager.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY29udHJvbGxlci9pbXBsL0RlZmF1bHRCcm9rZXJIZWFydGJlYXRNYW5hZ2VyLmphdmE=) | `82.27% <0.00%> (-3.80%)` | :arrow_down: |
   | [...pl/consumer/ConsumeMessageConcurrentlyService.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Db25zdW1lTWVzc2FnZUNvbmN1cnJlbnRseVNlcnZpY2UuamF2YQ==) | `47.05% <0.00%> (-2.27%)` | :arrow_down: |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `60.79% <0.00%> (-2.21%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `60.43% <0.00%> (-2.20%)` | :arrow_down: |
   | [...mq/store/ha/autoswitch/AutoSwitchHAConnection.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL2F1dG9zd2l0Y2gvQXV0b1N3aXRjaEhBQ29ubmVjdGlvbi5qYXZh) | `70.16% <0.00%> (-1.62%)` | :arrow_down: |
   | [.../rocketmq/broker/filter/ConsumerFilterManager.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvZmlsdGVyL0NvbnN1bWVyRmlsdGVyTWFuYWdlci5qYXZh) | `72.19% <0.00%> (-0.90%)` | :arrow_down: |
   | [...apache/rocketmq/store/queue/BatchConsumeQueue.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3F1ZXVlL0JhdGNoQ29uc3VtZVF1ZXVlLmphdmE=) | `69.67% <0.00%> (-0.55%)` | :arrow_down: |
   | [.../org/apache/rocketmq/store/ha/DefaultHAClient.java](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL0RlZmF1bHRIQUNsaWVudC5qYXZh) | `60.71% <0.00%> (-0.52%)` | :arrow_down: |
   | ... and [14 more](https://codecov.io/gh/apache/rocketmq/pull/6262?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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

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


[GitHub] [rocketmq] zhouxinyu commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "zhouxinyu (via GitHub)" <gi...@apache.org>.
zhouxinyu commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1131908763


##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:
##########
@@ -83,9 +83,9 @@ public CompletableFuture<QueryRouteResponse> queryRoute(ProxyContext ctx, QueryR
             }
 
             QueryRouteResponse response = QueryRouteResponse.newBuilder()
-                .setStatus(ResponseBuilder.getInstance().buildStatus(Code.OK, Code.OK.name()))
-                .addAllMessageQueues(messageQueueList)
-                .build();
+                    .setStatus(ResponseBuilder.getInstance().buildStatus(Code.OK, Code.OK.name()))
+                    .addAllMessageQueues(messageQueueList)
+                    .build();

Review Comment:
   It seems that there is a code style issue. Try importing the  [rmq_code_style](https://github.com/apache/rocketmq/blob/develop/style/rmq_codeStyle.xml) to avoid introduce unnecessary code changes.



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

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


[GitHub] [rocketmq] WSYwsy22 commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1133518369


##########
proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:
##########
@@ -148,6 +148,7 @@ public class ProxyConfig implements ConfigFile {
     private int consumerProcessorThreadPoolNums = PROCESSOR_NUMBER;
     private int consumerProcessorThreadPoolQueueCapacity = 10000;
 
+    private boolean forceUseEndpointPort = false;

Review Comment:
   yes it should be more suitable,I'll modify it



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

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


[GitHub] [rocketmq] xdkxlk merged pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "xdkxlk (via GitHub)" <gi...@apache.org>.
xdkxlk merged PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262


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

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


[GitHub] [rocketmq] WSYwsy22 commented on pull request #6262: fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#issuecomment-1457905901

   > Hi @WSYwsy22 you can create issue first and link this PR to you create issue
   
   I have created an issue and referenced it


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

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


[GitHub] [rocketmq] WSYwsy22 commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1131930559


##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:
##########
@@ -83,9 +83,9 @@ public CompletableFuture<QueryRouteResponse> queryRoute(ProxyContext ctx, QueryR
             }
 
             QueryRouteResponse response = QueryRouteResponse.newBuilder()
-                .setStatus(ResponseBuilder.getInstance().buildStatus(Code.OK, Code.OK.name()))
-                .addAllMessageQueues(messageQueueList)
-                .build();
+                    .setStatus(ResponseBuilder.getInstance().buildStatus(Code.OK, Code.OK.name()))
+                    .addAllMessageQueues(messageQueueList)
+                    .build();

Review Comment:
   fix done



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

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


[GitHub] [rocketmq] mxsm commented on pull request #6262: fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#issuecomment-1457632351

   Hi @WSYwsy22 you can create issue first and link this PR to you create issue


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

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


[GitHub] [rocketmq] WSYwsy22 commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1130964716


##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:
##########
@@ -162,12 +161,11 @@ protected Permission convertToPermission(int perm) {
     }
 
     protected List<org.apache.rocketmq.proxy.common.Address> convertToAddressList(Endpoints endpoints) {
-        int port = ConfigurationManager.getProxyConfig().getGrpcServerPort();
         List<org.apache.rocketmq.proxy.common.Address> addressList = new ArrayList<>();
         for (Address address : endpoints.getAddressesList()) {
             addressList.add(new org.apache.rocketmq.proxy.common.Address(
                 org.apache.rocketmq.proxy.common.Address.AddressScheme.valueOf(endpoints.getScheme().name()),
-                HostAndPort.fromParts(address.getHost(), port))
+                HostAndPort.fromParts(address.getHost(), address.getPort()))

Review Comment:
   I have added a configuration to support the k8s NodePort mode according to your suggestion, and there is another Tests by Bazel Action run fail, which I do not understand



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

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


[GitHub] [rocketmq] WSYwsy22 commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "WSYwsy22 (via GitHub)" <gi...@apache.org>.
WSYwsy22 commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1130590374


##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:
##########
@@ -162,12 +161,11 @@ protected Permission convertToPermission(int perm) {
     }
 
     protected List<org.apache.rocketmq.proxy.common.Address> convertToAddressList(Endpoints endpoints) {
-        int port = ConfigurationManager.getProxyConfig().getGrpcServerPort();
         List<org.apache.rocketmq.proxy.common.Address> addressList = new ArrayList<>();
         for (Address address : endpoints.getAddressesList()) {
             addressList.add(new org.apache.rocketmq.proxy.common.Address(
                 org.apache.rocketmq.proxy.common.Address.AddressScheme.valueOf(endpoints.getScheme().name()),
-                HostAndPort.fromParts(address.getHost(), port))
+                HostAndPort.fromParts(address.getHost(), address.getPort()))

Review Comment:
   yes



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

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


[GitHub] [rocketmq] xdkxlk commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "xdkxlk (via GitHub)" <gi...@apache.org>.
xdkxlk commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1134879726


##########
proxy/src/test/java/org/apache/rocketmq/proxy/config/ConfigurationManagerTest.java:
##########
@@ -24,12 +24,6 @@
 
 public class ConfigurationManagerTest extends InitConfigTest {
 
-    @Test
-    public void testInitEnv() {
-        // configure proxy home by system env.
-        assertThat(ConfigurationManager.getProxyHome()).isEqualTo(mockProxyHome);
-    }
-

Review Comment:
   This has been fixed in #6329



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

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


[GitHub] [rocketmq] xdkxlk commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "xdkxlk (via GitHub)" <gi...@apache.org>.
xdkxlk commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1130585870


##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/route/RouteActivity.java:
##########
@@ -162,12 +161,11 @@ protected Permission convertToPermission(int perm) {
     }
 
     protected List<org.apache.rocketmq.proxy.common.Address> convertToAddressList(Endpoints endpoints) {
-        int port = ConfigurationManager.getProxyConfig().getGrpcServerPort();
         List<org.apache.rocketmq.proxy.common.Address> addressList = new ArrayList<>();
         for (Address address : endpoints.getAddressesList()) {
             addressList.add(new org.apache.rocketmq.proxy.common.Address(
                 org.apache.rocketmq.proxy.common.Address.AddressScheme.valueOf(endpoints.getScheme().name()),
-                HostAndPort.fromParts(address.getHost(), port))
+                HostAndPort.fromParts(address.getHost(), address.getPort()))

Review Comment:
   Add a configuration to decide whether to use the configured port in proxyConfig or the port in the endpoint is better



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

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


[GitHub] [rocketmq] drpmma commented on a diff in pull request #6262: [ISSUE #6268] fix rocketmq-proxy does not work properly in k8s nodePort mode

Posted by "drpmma (via GitHub)" <gi...@apache.org>.
drpmma commented on code in PR #6262:
URL: https://github.com/apache/rocketmq/pull/6262#discussion_r1133516805


##########
proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:
##########
@@ -148,6 +148,7 @@ public class ProxyConfig implements ConfigFile {
     private int consumerProcessorThreadPoolNums = PROCESSOR_NUMBER;
     private int consumerProcessorThreadPoolQueueCapacity = 10000;
 
+    private boolean forceUseEndpointPort = false;

Review Comment:
   how about `useEndpointPortFromRequest`?



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

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