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

alarm模块关于redis操作的2个问题 #919

Open
LeegoXu opened this issue Jan 4, 2021 · 2 comments
Open

alarm模块关于redis操作的2个问题 #919

LeegoXu opened this issue Jan 4, 2021 · 2 comments

Comments

@LeegoXu
Copy link

LeegoXu commented Jan 4, 2021

想请教两个问题:

  1. alarm模块里面为什么不用mq而用redis存放待发送的消息?
  2. 生产redis的逻辑和消费redis的逻辑是否分散在2个模块里面写更好?
@laiwei
Copy link
Member

laiwei commented Jan 4, 2021

想请教两个问题:

  1. alarm模块里面为什么不用mq而用redis存放待发送的消息?

为了减少需要部署的组件,用 redis 来实现了队列。

  1. 生产redis的逻辑和消费redis的逻辑是否分散在2个模块里面写更好?

judge 生产消息,alarm 消费消息,基本上就是这样一个大逻辑。

@LeegoXu
Copy link
Author

LeegoXu commented Jan 4, 2021

  1. 第一个回答是说:用redis做了队列,就可以不用再部署专门的mq组件了对吧?

  2. 第二个问题,我还想再问一下:流程后面“/sms”,“/im”这些,我看也是用redis实现了队列。那么这里为什么既让alarm生产消息,又让alarm消费消息呢?

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

2 participants