使用消息队列的应用程序的好例子

编程入门 行业动态 更新时间:2024-10-23 09:40:30
本文介绍了使用消息队列的应用程序的好例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想了解有关编程消息传递应用程序和使用消息队列的更多信息.诸如qpid,Amazon Queues等之类的东西.您能为我介绍一些应用程序(最好是C ++,如果可能的话,开源),以便我可以学习更多.

I would like to learn more about programming messaging applications and using message queues. Things like qpid, Amazon Queues, etc. Can you point me to some apps (preferably C++, open source if possible) so I can learn more.

此外,您能告诉我一个用来确定是否不使用消息队列的一般准则.我只是因为凉爽"因素而对此感兴趣,但我认为将来可能对我有好处.

Also, can you tell me the general guidelines one would use to decide whether ot not to use message queues. I am interesting in leanring about this just for the 'coolness' factor but I think it might be beneficial for me in the future.

推荐答案

RabbitMQ 是我的消息队列最熟悉就像qpid一样,它实现了AMQP. AMQP是一种被广泛接受的有线协议,并且有许多可用的客户端库,例如C ++,Java,Ruby,.Net,Python等.

RabbitMQ is the Message Queue that I am the most familiar with. It implements AMQP just like qpid. AMQP is a widely accepted wire protocol and there are many client libraries available such as C++, Java, Ruby, .Net, Python, etc.

如果分布式服务不稳定并且不总是在线,则可以使用坚如磐石的消息队列来保留消息.然后,当分布式服务恢复正常工作时,便会传递这些消息.

If the distributed service is flaky and is not always online, you can use a rock solid message queue to persist the messages. The messages are then delivered when the distributed service comes back to life.

如果分布式服务具有低延迟,并且客户端服务生成的请求超出了分布式服务处理的范围,则队列将保留消息,直到分布式服务可以处理它们为止,同时允许客户端不受限制地进行处理.

If the distributed service has low latency and the client service generates more requests than the distributed service can handle, a queue will hold the messages until the distributed service can process them while allowing the client to process uninhibited.

如果需要将请求分发到多个服务,则交换将注意重要的细节,例如将消息一次又一次地传递到每个分布式服务.

If requests need to be distributed to multiple services, an exchange will take care the important details such as delivering the message to each distributed service once and only once.

当您需要同步调用远程服务时,我不建议使用消息队列.消息队列本质上是异步的.

I don't recommend using message queues when you need a synchronous call to a remote service. Message queues are inherently asynchronous.

更多推荐

使用消息队列的应用程序的好例子

本文发布于:2023-06-01 10:25:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/412974.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:队列   应用程序   例子   消息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!