Why do we need RabbitMQ when we have a more powerful network framework in Python called Twisted. I am trying to understand the reason why someone would want to use RabbitMQ.

在Python中有一个更强大的网络框架叫做Twisted,为什么我们需要RabbitMQ呢?我试图理解为什么有人想要使用RabbitMQ。

Could you please provide a scenario or an example using RabbitMQ?

能否提供一个使用RabbitMQ的场景或示例?

Also, where can I find a tutorial on how to use RabbitMQ?

此外,在哪里可以找到如何使用RabbitMQ的教程?

6 个解决方案

#1


21

Let me tell you a few reasons that makes using MOM (Message Oriented Middleware) probably the best choice.

让我告诉您一些原因,使使用MOM(面向消息的中间件)可能是最好的选择。

Decoupling:

It can decouple/separate the core components of the application. There is no need to bring all the benefits of the decoupled architecture here. I just want to point it out that this is one of the main requirement of writing a quality and maintainable software.

它可以分离/分离应用程序的核心组件。这里不需要为分离的体系结构带来所有好处。我只想指出,这是编写高质量和可维护性软件的主要要求之一。

Flexibility:

It is actually very easy to connect two totally different applications written on different languages together by using AMQP protocol. These application will talk to each other by the help of a "translator" which is MOM.

通过使用AMQP协议,实际上很容易将写在不同语言上的两个完全不同的应用程序连接在一起。这些应用程序将通过“翻译”(即“妈妈”)相互交流。

Scalability:

By using MOM we can scale the system horizontally. One message producer can transmit to unlimited number of message consumers a task, a command or a message for processing and for scaling this system all we need to do is just create new message consumers. Lets say we are getting 1000 pictures per second and we must resize them. Solving this problem with traditional methods could be a headache. With MOM we can transmit images to the message consumers which can do their job asynchronously and make sure data integrity is intact.

通过使用MOM,我们可以水平地扩展系统。一个消息生成器可以向无限数量的消息使用者发送一个任务、一个命令或一个消息,用于处理和扩展这个系统,我们需要做的只是创建新的消息使用者。假设我们每秒得到1000张照片,我们必须调整它们的大小。用传统方法解决这个问题可能会让人头疼。通过MOM,我们可以将图像传输给消息使用者,该使用者可以异步完成他们的工作,并确保数据完整性完好无损。

They are other benefits of using MOM as well but these 3 are the most significant in my opinion.

它们也是使用MOM的其他好处,但在我看来,这三点是最重要的。

更多相关文章

  1. Linux下多任务间通信和同步-消息队列
  2. 安卓消息处理机制
  3. JAVA实现 springMVC方式的微信接入、实现消息自动回复
  4. 为什么我们应该将XMPP而不是JSON用于简单(仅文本)消息传递应用程序
  5. Android[中级教程] 深入剖析Android消息机制
  6. Android消息推送接收后,通知栏的显示
  7. 在使用visualvm进行分析时,如何避免“Profiler代理警告:无法查找缓

随机推荐

  1. OnClick事件只获取第一个动态创建的行/ i
  2. 删除没有\ r \ n的换行符
  3. 为什么我的javascript/jquery代码不能像
  4. 从表的第一行和第一列中删除可选择的jque
  5. 【JavaScript】案例一:使用JS完成注册页面
  6. Javascript实现统一的表单验证
  7. 从特定条件下存储在localStorage中的数组
  8. 停止鼠标用javascript双击某些元素
  9. 在量角器中检索子元素的数组
  10. Node.js无法找到模块'tcp'