apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.22k stars 11.68k forks source link

How to set rocketmq-proxy access through k8s host nodeport #8864

Open liuxin638507 opened 1 week ago

liuxin638507 commented 1 week ago

Before Creating the Bug Report

Runtime platform environment

ubuntu20.04

RocketMQ version

version: 5.3.1

JDK Version

docker pull apache/rocketmq:5.3.1

Describe the Bug

rocketmq-proxy deployed in k8s: port 8080 is mapped through the host nodeport, and the rocketmq-proxy container ip and port are returned when the program accesses the nodeport port. How do I set the return to the connected host ip+nodeport port Client. Exception. MQBrokerException: CODE: 15 DESC: Request doesn 't have the field bnane BROKER: 10.42.19.4:8080 image

Steps to Reproduce

rocketmq-proxy deployed in k8s: port 8080 is mapped through the host nodeport, and the rocketmq-proxy container ip and port are returned when the program accesses the nodeport port. How do I set the return to the connected host ip+nodeport port Client. Exception. MQBrokerException: CODE: 15 DESC: Request doesn 't have the field bnane BROKER: 10.42.19.4:8080

What Did You Expect to See?

How to set rocketmq-proxy access through k8s host nodeport

What Did You See Instead?

How to set rmq-proxy parameter or variable? rmq-proxy returns the ip and port of the host when it can be accessed through nodeport

Additional Context

No response

xiaoma20082008 commented 1 week ago

There is no need create a Service(nodePort/loadbalance) for broker/proxy, only create it for namesrv is fun, because the loadbalance is working by client.

liuxin638507 commented 1 week ago

10.42.19.4:8080

10.42.19.4:8080 is proxy address,How to set rmq-proxy parameter or variable? rmq-proxy returns the ip and port of the host when it can be accessed through nodeport

qianye1001 commented 1 week ago

If you access the proxy using the rocketmq-client sdk through load balancing or other methods, you need to configure the remotingAccessAddr parameter in the proxy config.

liuxin638507 commented 6 days ago

If you access the proxy using the rocketmq-client sdk through load balancing or other methods, you need to configure the remotingAccessAddr parameter in the proxy config.

How to set it