MQ 简介

Java54

You must try things that may not work. And you must not let anyone define your limits because of where you come from. Your only limit is your soul.

不要害怕失败。不要因为你的低出生率而让别人限制你的发展。你的成功或失败取决于你自己。

[En]

Don't be afraid of failure. Don't let others limit your development because of your low birth. Your success or failure depends on yourself.

消息队列已经逐渐成为企业IT系统内部通信的核心手段。它具有低耦合、可靠投递、广播、流量控制、最终一致性等一系列功能,成为异步RPC的主要手段之一。

常见的消息中间件有:

传统方式 采用同步的形式调用接口,如果调用的过程非常耗时间的话,客户需要等待非常久的时间才会响应;这样对客户端体验非常不好。

通常我们采用MQ来进行以下操作

  • 流量削峰
  • 应用解耦
  • 异步调用

流量削峰

如果订单系统最多可以处理10000个订单,则处理能力足以在正常时期处理订单。在正常时期,我们可以在下单一秒钟后返回结果。

[En]

If the order system can process 10000 orders at most, the processing capacity is more than enough to deal with orders in the normal period. In the normal period, we can return the results after placing an order for one second.

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长