RabbitMQ

Sidekiq VS. RabbitMQ

时光怂恿深爱的人放手 提交于 2020-01-02 02:45:06
问题 We are in need of a queuing system in our Ruby On Rails 4 web application what are the differences and why would/wouldn't you pick Sidekiq over RabbitMQ ? 回答1: It's quite different things with different usage. Sidekiq is full-featured solution for job queueing and processing, while RabbitMQ is just a message broker where you can build your own stuff upon it. 来源: https://stackoverflow.com/questions/34525941/sidekiq-vs-rabbitmq

Is it appropriate to use message queues for synchronous rpc calls via ajax

为君一笑 提交于 2020-01-02 01:21:46
问题 I have a web application that uses the jquery autocomplete plugin, which essentially sends via ajax a request containing text that has been typed into a textbox to our web server, once the web server receives this request, it is then handed off to rabbitmq. I know that we do get benefits from using messaging, but it seems like using it for blocking rpc calls is a misuse and that something like WCF is far more appropriate in this instance, is this the case or is it considered acceptable

RabbitMQ Topic exchanges: 1 Exchange vs Many Exchanges

强颜欢笑 提交于 2020-01-02 00:23:06
问题 I have a scenario where I have a series of processes I need to perform, each step is done and scaled in independent applications. I am using topic exchanges for all exchanges. Current topology is something like this: P -> X -> Q -> C/P -> X -> Q -> C We are "versioning" our queues to deal with probable requirements changes effecting message structure. Bindings might look something like this: step1.exchange bound to step1.v1.queue with binding key step1.v1 step1.exchange bound to step1.v2

消息中间件(RabbitMQ)04

有些话、适合烂在心里 提交于 2020-01-01 15:16:31
一、rabbitmq实现了AMQP协议 AMQP是应用层协议的一个开放标准,为面向消息的中间件设计。基于此协议的客户端与消息中间件可传递消息,并不受客户端/中间件不同产品,不同的开发语言等条件的限制。目标是实现一种在全行业广泛使用的标准消息中间件技术,以便降低企业和系统集成的开销,并且向大众提供工业级的集成服务。主要实现有 RabbitMQ。 二、AMQP包含的要素 生产者 :消息的创建者,发送到rabbitmq; 消费者 :连接到rabbitmq,订阅到队列上,消费消息,持续订阅(basicConsumer)和单条订阅(basicGet). 消息: 包含有效载荷和标签,有效载荷指要传输的数据,,标签描述了有效载荷,并且rabbitmq用它来决定谁获得消息,消费者只能拿到有效载荷,并不知道生产者是谁。 信道 ,概念:信道是生产消费者与rabbit通信的渠道,生产者publish或是消费者subscribe一个队列都是通过信道来通信的。信道是建立在TCP连接上的虚拟连接,什么意思呢?就是说rabbitmq在一条TCP上建立成百上千个信道来达到多个线程处理,这个TCP被多个线程共享,每个线程对应一个信道,信道在rabbit都有唯一的ID ,保证了信道私有性,对应上唯一的线程使用 (为什么不建立多个TCP连接呢?原因是rabbit保证性能,系统为每个线程开辟一个TCP是非常消耗性能

SockJS Python Client

六月ゝ 毕业季﹏ 提交于 2020-01-01 08:52:07
问题 I have a website (Java + Spring) that relies on Websockets (Stomp over Websockets for Spring + RabbitMQ + SockJS) for some functionality. We are creating a command line interface based in Python and we would like to add some of the functionality which is already available using websockets. Does anyone knows how to use a python client so I can connect using the SockJS protocol ? PS_ I am aware of a simple library which I did not tested but it does not have the capability to subscribe to a

Is there a timeout for acking RabbitMQ messages?

无人久伴 提交于 2020-01-01 08:39:04
问题 I would like to set a timeout after which a dequeued message is automatically NACKed. When I dequeue a message I wait until it is transfered over a socket and the other party confirms its reception. Do I need to keep a list of Timers or can RMQ handle this automatically? private void Run() { _rmqConnection = _queueConnectionFactory.CreateFactory().CreateConnection(); _rmqReadchannel = _rmqConnection.CreateModel(); _rmqReadchannel.QueueDeclare(QueueIdOutgoing(), true, false, false, null);

Is there a timeout for acking RabbitMQ messages?

痴心易碎 提交于 2020-01-01 08:38:33
问题 I would like to set a timeout after which a dequeued message is automatically NACKed. When I dequeue a message I wait until it is transfered over a socket and the other party confirms its reception. Do I need to keep a list of Timers or can RMQ handle this automatically? private void Run() { _rmqConnection = _queueConnectionFactory.CreateFactory().CreateConnection(); _rmqReadchannel = _rmqConnection.CreateModel(); _rmqReadchannel.QueueDeclare(QueueIdOutgoing(), true, false, false, null);

Docker 安装rabbitmq

怎甘沉沦 提交于 2020-01-01 07:38:15
文章目录 查询rabbitmq镜像 拉取rabbitmq镜像 创建并启动容器 备选启动同时设置用户和密码 注意 查看rabbitmq运行状况 运行 查询rabbitmq镜像 docker search rabbitmq:management 拉取rabbitmq镜像 docker pull rabbitmq:management 创建并启动容器 docker run -d --hostname my-rabbit --name rabbit -p 15672:15672 rabbitmq:management –hostname:指定容器主机名称 –name:指定容器名称 -p:将mq端口号映射到本地 备选启动同时设置用户和密码 docker run -d --hostname rabbitmq --name rabbit -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest -p 15672:15672 -p 5672:5672 -p 25672:25672 -p 61613:61613 -p 1883:1883 rabbitmq:management 注意 15672:控制台端口号 5672:应用访问端口号 查看rabbitmq运行状况 docker logs rabbit 运行 http://192.168

Configure HAProxy for rabbitmq

你离开我真会死。 提交于 2020-01-01 06:38:28
问题 I want to use HAProxy as a load balancer. I want to put two rabbitmq server behind haproxy. Both the rabbitmq server are on different instance of EC2. I have configure HAProxy server by following this reference. I works but the problem is messages are not published in roundrobin pattern. Messages are publish only on one server. Is there any different configuration for my requirement? My configureation in /etc/haproxy/haproxy.cfg listen rabbitmq 0.0.0.0:5672 mode tcp stats enable balance

TxSelect and TransactionScope

﹥>﹥吖頭↗ 提交于 2020-01-01 06:30:30
问题 Recently, I've been checking out RabbitMQ over C# as a way to implement pub/sub. I'm more used to working with NServiceBus. NServiceBus handles transactions by enlisting MSMQ in a TransactionScope . Other transaction aware operations can also enlist in the same TransactionScope (like MSSQL) so everything is truly atomic. Underneath, NSB brings in MSDTC to coordinate. I see that in the C# client API for RabbitMQ there is a IModel.TxSelect() and IModel.TxCommit() . This works well to not send