简体   繁体   English

RabbitMQ实施细节

[英]RabbitMQ implementation details

I recently watched a nice presentation about how RabbitMQ works and it kinda intrigued on how whole AMQP implentation works. 最近,我观看了有关RabbitMQ如何工作的精彩演示,并且对整个AMQP模拟的工作方式很感兴趣。

I was considering using it for a project but I would like some answers about the following questions: 我当时正在考虑将其用于一个项目,但是我想对以下问题给出一些答案:

1) Is it possible to have a broker and a producer of a message at the same place? 1)是否可以在同一位置安排消息的经纪人和生产者? I do understand that RabbitMQ allows the use of Virtual Hosts so something like this could be possible right? 我确实了解RabbitMQ允许使用虚拟主机,所以类似这样的事情是可能的吧?

2) Can RabbitMQ transmit it's messages over two diferrent subnets? 2)RabbitMQ可以通过两个不同的子网传输其消息吗? I know it can trasmit over lan or wan, but how easy it to do this over two subnets? 我知道它可以在lan或wan上传输,但是在两个子网之间进行传输有多容易呢? (One answer here would actually be to have them bridged). (这里的一个答案实际上是将它们桥接)。

3) Regarding question 1, how hard would it be to fail over the broker functionality to another place in case the original broker goes down? 3)关于问题1,如果原始代理发生故障,将代理功能故障转移到另一个地方有多困难?

4) I do understand that RabbitMQ actually provides different types of message transmissions. 4)我确实了解RabbitMQ实际上提供了不同类型的消息传输。 One of those is the fanout type which is more or less similar to a broadcast action. 其中之一是扇出类型,与广播动作或多或少相似。 Would it be possible though to have something that is the inversed type of that. 是否有可能具有相反的类型。 Meaning that you have multiple producers with multiple queues that all transmit to a single consumer? 意味着您有多个生产者,它们具有多个队列,并且都传输给单个使用者?

1) It doesn't matter where the consumers/producers are, as long as they can reach (access IP:port) the broker. 1)消费者/生产者在哪里都无所谓,只要他们可以到达(访问IP:端口)代理。 Virtual hosts have nothing to do with that. 虚拟主机与此无关。

2) More or less same as answer to first one, RabbitMQ us using the network and has no knowledge about what kind of networks is it in; 2)与第一个答案,RabbitMQ us使用网络大致相同,并且不知道它属于哪种网络; also doesn't need to know or care. 也不需要知道或关心。

3)Failover is easy, look for rabbitmq cluster and high availability . 3)故障转移很容易,寻找rabbitmq 集群高可用性 For the clients you'd have to take care on your own (so how to reconnect etc). 对于客户端,您必须自己保管(如何重新连接等)。

4) yes, broadcast is possible, you should have a look at tutorials and what kind of exchanges are there. 4)是的,可以进行广播,您应该看一下教程以及那里进行什么样的交流。 EDIT As zapl pointed out in the comments, you can also do the inverse of broadcast. 编辑正如zapl在评论中指出的,您还可以进行广播的逆操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM