I have two network envionments (such as NETWORK -A
and NETWORK -B
). Now, I deployed rocketmq-a in the NETWORK-A
and deployed rocketmq-b in the NETWORK-B
, how to communicate rocketmq-a and rocketmq-b directly?
Asked
Active
Viewed 278 times
-1

Vlad Dekhanov
- 1,066
- 1
- 13
- 27

liushaishuai
- 1
- 1
-
What do you mean communicate? Do you mean rocektmq-b is a slave of rocketmq-a? – JaskeyLam Apr 17 '17 at 12:57
-
The communicate mean that rocketmq-a can send messages to rocketmq-b. Rocketmq-b is not a salve of rocketmq-a. For example: rocketmq-a in a network environment in New York,rocketmq-b in a network environment in London.Does rocketmq-a send messages to rocketmq-b? – liushaishuai Apr 18 '17 at 06:15
-
The broker itself can not send messages. What I understand is that, you have a service A in New York subscribed topic from rocketmq-a,which is also in New York. And service A needs to send messages to the rocketmq-broker in London, is that so? – JaskeyLam Apr 18 '17 at 06:50
-
Service A needs send messages to the rocketmq-a,which is in New York. And rocketmq-a needs to send messages to the rocketmq-b,which is in London. (Service A----->rocketmq-a------>rocketmq-b----->Service b) – liushaishuai Apr 18 '17 at 07:28
-
What do you mean rocketmq-a needs to send message? Broker can not send messages, only client can send message, do you mean you want to replicate the message to rocketmq-b? – JaskeyLam Apr 19 '17 at 02:55
-
yes,Rocketmq-a needs to send message. I want to replicate the message to rocketmq-b. Please,can i replicate the message to rocketmq-b? you said: " only client can send message" , do you mean rocketmq-a' client send message to rocketmq-b? – liushaishuai Apr 21 '17 at 08:08
-
please check my answers – JaskeyLam Jul 18 '17 at 08:25
1 Answers
0
According to your comment, you have two rocketmq clusters and one message should replicate to another rocketmq cluster.
So this is a message replication.
you have two choices:
Implement a send message hook
Use a messageStore plugIn that extend
AbstractPluginMessageStore
and load it using broker configuration
Both of them needs to implement replication by yourself.
However, if you make them the same broker group, it is very easy.
Just make rocketmq-b as a slave of rocketmq-a, and deploy them in different machine room.
Then rocketmq-b will only provide read operations and always replicate the data from master

JaskeyLam
- 15,405
- 21
- 114
- 149