You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by "abig-orange (via GitHub)" <gi...@apache.org> on 2024/06/18 12:24:36 UTC

[D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

GitHub user abig-orange created a discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

![image](https://github.com/apache/rocketmq/assets/13475926/e1af7fb5-7270-4c43-ab7a-04613502fdf0)
连接mq的代码,192.168.0.173:19999

![image](https://github.com/apache/rocketmq/assets/13475926/a3615353-b1c0-4b14-90b7-dfcc691fe1a0)
nginx的配置,
一直连不上mq所在的192.168.0.173:9876

GitHub link: https://github.com/apache/rocketmq/discussions/8308

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "YongXiaoo (via GitHub)" <gi...@apache.org>.
GitHub user YongXiaoo added a comment to the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

可以把nginx改成在网络层代理,stream模块代理TCP流量,应该就可以了

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345582

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "Tensor-momo (via GitHub)" <gi...@apache.org>.
GitHub user Tensor-momo added a comment to the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

是的后面用tcp代理就没问题了
#stream配置
stream {
    server {
       listen 8080;
       proxy_connect_timeout 1s;
       proxy_timeout 3s;
       proxy_pass xxx.xxx.xxx.xxx:9876;
    }
}

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345722

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "YongXiaoo (via GitHub)" <gi...@apache.org>.
GitHub user YongXiaoo deleted a comment on the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

可以把nginx改成在网络层代理,stream模块代理TCP流量,应该就可以了

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345567

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "YongXiaoo (via GitHub)" <gi...@apache.org>.
GitHub user YongXiaoo deleted a comment on the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

nginx可以改成在stream模块进行流量代理

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345576

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "abig-orange (via GitHub)" <gi...@apache.org>.
GitHub user abig-orange added a comment to the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

如果连接mq的代码中改成   
producer.setNamesrvAddr("192.168.0.173:9876");
那么将正常连接发送消息

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-9805798

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "YongXiaoo (via GitHub)" <gi...@apache.org>.
GitHub user YongXiaoo added a comment to the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

可以把nginx改成在网络层代理,stream模块代理TCP流量,应该就可以了

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345567

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org


Re: [D] 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由 [rocketmq]

Posted by "YongXiaoo (via GitHub)" <gi...@apache.org>.
GitHub user YongXiaoo added a comment to the discussion: 想通过nginx来转发请求,但是MQ的好像不支持带后缀的nginx路由

nginx可以改成在stream模块进行流量代理

GitHub link: https://github.com/apache/rocketmq/discussions/8308#discussioncomment-10345576

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org