Skip to content
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

消息发送两次 #5

Open
fanchao01 opened this issue Jan 24, 2018 · 1 comment
Open

消息发送两次 #5

fanchao01 opened this issue Jan 24, 2018 · 1 comment

Comments

@fanchao01
Copy link

开启mirror queue时,消息通路是:
channel
-> rabbit_amqqueue:delvier
->delegate:cast(mast_pid) 主走这个
->rabbit_amqqueue_process
->rabbit_queue_deliver: 在在消费者,直接发给存在的consumer
->rabbit_mirror_queue_master:publish
-> gm:broadcast
<1> ->rabbit_mirror_queue_slave:process_instruction({publish... slave节点
->publish_or_discard
->BQ:publish 放入variable_queue
-> rabbit_variable_queue:publish 放入自己的BQ
-> 通过gm广播到各slave节点
->deletegate:cast(slave_pids) slave节点
<2> -> rabbt_mirror_queue_salve: 收到消息

我想问的是<1>和<2>通过gm和delegate将消息两次发送到slave节点,这个有什么作用,为啥要发送两次呢?

@fanchao01
Copy link
Author

我去,这个空格没有,尴尬。简单来说就是,消息会通过gm和deletgate两次发送到rabbit_mirror_queue_slave上,gm那次会存到后端BQ;为啥要分发两次呢?多谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant