-
Notifications
You must be signed in to change notification settings - Fork 11.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namesrv nearby route #4382
Comments
Good Issue. Do you have any practice with this? |
In our company, Cross-VDC hypermetro needs to be implemented within a region,avoid faults in a single region. An Apache RocketMQ Cluster is deployed across VDCS within a region. In normal cases, the nearest VDC produces and consumes messages. When a VDC is unavailable, the other VDC can produce and consume messages. |
@lwclover Is the master-slave replication cross-VDC too? |
One case is across VDC on different clouds, and another case is across geographical locations within a VDC, like beijing and baoding |
* fix:when broker is down,async send model can not retry * fix Issue #3556 * fix Issue #3556 * fix Issue #3556 * fix Issue #3556 * async send model success retry when occurs Exception * test case testSendMessageAsync_WithException * modify test case testSendMessageAsync_WithException * adding exception message with broker addr when occuring broker connect timeout * repair code style * in async mode,set ThreadExecutorPool AbortPolicy * Optimize asynchronous send timeout logic code * Adjusting log information * Delete SendMessageProcessor.java * 恢复上一个版本 * namesrv nearby route * Revert to previous version code * add lisence header to Network.java * code style * 根据broker和client配置的标识返回路由信息 * Delete greetings.yml * Delete .gitignore * reset previous version * reset to previous version * code style * Namesrv nearby route implements all by RPCHook * reset to prevous version * ServiceProvider return to original position * Nearby route make the code clear * revert to ori version * reset to ori version * reset to ori version * reset to ori version * Keep same as the official version * Keep same as the official version * Keep same as the official version Co-authored-by: sunhangda <sunhangda@lixiang.com>
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. |
This issue was closed because it has been inactive for 3 days since being marked as stale. |
RocketMQ同机房就近生产和消费机制。
RocketMQ注册、发现机制
Producer第一次发送消息时会同步向namesrv请求topic路由信息,然后默认轮询往每个Queue发送消息。
Consumer启动时获取topic路由信息,然后请求broker获取consumer实例列表,最后根据consumer的数量和负载均衡算法给consumer分配queue。
实现rocketmq同机房就近生产和消费:
1.broker增加一个zoneName标识配置,通过heartbeat注册到namesrv上。
2.Producer和Consumer可以通过API或者环境变量、系统变量设置zoneName和zoneMode(这是一个开关)。
3.Producer和Consumer获取topic路由信息时,在namesrv上返回对应标识的broker信息。
The text was updated successfully, but these errors were encountered: