amqp

RabbitMQ / AMQP: single queue, multiple consumers for same message?

匿名 (未验证) 提交于 2019-12-03 02:12:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am just starting to use RabbitMQ and AMQP in general. I have a queue of messages I have multiple consumers, which I would like to do different things with the same message . Most of the RabbitMQ documentation seems to be focused on round-robin, ie where a single message is consumed by a single consumer, with the load being spread between each consumer. This is indeed the behavior I witness. An example: the producer has a single queue, and send messages every 2 sec: var amqp = require('amqp'); var connection = amqp.createConnection({ host:

RabbitMQ / AMQP: single queue, multiple consumers for same message?

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am just starting to use RabbitMQ and AMQP in general. I have a queue of messages I have multiple consumers, which I would like to do different things with the same message . Most of the RabbitMQ documentation seems to be focused on round-robin, ie where a single message is consumed by a single consumer, with the load being spread between each consumer. This is indeed the behavior I witness. An example: the producer has a single queue, and send messages every 2 sec: var amqp = require('amqp'); var connection = amqp.createConnection({ host:

RabbitMQ 相关概念

Deadly 提交于 2019-12-03 01:54:53
RabbitMQ 整体上是一个生产者与消费者模型,主要负责接收、存储和转发消息。可以把消息传递的过程想象成:当你讲一个包裹送到邮局,邮局会暂存并最终将邮件通过邮递员送到收件人的手上,RabbitMQ 就好比由邮局、邮箱和邮递员组成的一个系统。从计算机术语层面来说,RabbitMQ 模型更像是一种交换机模型。 RabbitMQ 的整体模型架构如下图: 生产者和消费者 Producer:生产者,就是投递消息的一方。 生产者创建消息,然后发不到 RabbitMQ 中。消息一般可以包含 2 个部分:消息体和标签(Label)。消息体也可以称之为 payload,在实际应用中,消息体一般是一个带有业务逻辑结构的数据,比如一个 JSON 字符串。当然可以进一步对这个消息体进行序列化操作。消息的标签用来表述这条消息,比如一个交换器的名称和一个路由键。生产者把消息交由 RabbitMQ,RabbitMQ 之后会根据标签把消息发送给感兴趣的消费者(Consumer)。 Consumer:消费者,就是接收消息的一方。 消费者连接到 RabbitMQ 服务器,并订阅到队列上。当消费者消费一条消息时,只是消费消息的消息体(payload)。在消息路由的过程中,消息的标签会丢弃,存入到队列中的消息只有消息体,消费者也会消费到消息体,也就不知道消息的生产者是谁,当然消费者也不需要知道。 Broker

Processing messages through named:channels with prefetch >= 1

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Good evening everybody I run with SpringXD-1.3.0.RELEASE (configuration: 3 admin and 3 container) and RabbitMQ 3.5.7 (3 nodes) into following scenario: stream create -- name fire -- definition "time --timeUnit=MILLISECONDS > topic:fire" -- deploy stream create -- name fireeater_1 -- definition "topic:fire > null" stream create -- name fireeater_2 -- definition "topic:fire > null" stream create -- name fireeater_3 -- definition "topic:fire > null" stream create -- name fireeater_4 -- definition "topic:fire > null" job create test123

Low-latency, large-scale message queuing

一曲冷凌霜 提交于 2019-12-03 01:43:41
问题 I'm going through a bit of a re-think of large-scale multiplayer games in the age of Facebook applications and cloud computing. Suppose I were to build something on top of existing open protocols, and I want to serve 1,000,000 simultaneous players, just to scope the problem. Suppose each player has an incoming message queue (for chat and whatnot), and on average one more incoming message queue (guilds, zones, instances, auction, ...) so we have 2,000,000 queues. A player will listen to 1-10

Spring AMQP RabbitMQ RPC - Handle response exceptions

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use a RPC AMQP RabbitMQ queue to send and receive messages. The problem is that I have set a setReplyTimeout value. When that happens I get a "org.springframework.amqp.AmqpRejectAndDontRequeueException: Reply received after timeout". I have a DLQ set up on the incoming queue, but it appears that the exception is received when spring tries to return the message on its queue that is automatically created. Thus how can I handle exceptions when sending messages back to a producer? Ideally I would want any message that gets an

Where are the AMQP 1.0 implementations? Would it make sense to wait?

一笑奈何 提交于 2019-12-03 01:25:41
I'm doing research to figure out what messaging solution to settle on for our future products and I can't really figure this one out. There is a bunch of AMQP 0.9.1 implementations (RabbitMQ, Apache Qpid, OpenAMQ, to name a few), but no AMQP 1.0 implementation, although 1.0 has been finalized October 2011. Well, except for SwiftMQ [1]. Reading up on 1.0, it seems to be a major departure from the pre-1.0 spec, so it seems understandable that there's little enthusiasm for a major rewrite of something that is working fine. In fact, I can't see why RabbitMQ and others wouldn't just decide to

amqp vs amqplib - which Node.js amqp client library is better?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 01:10:17
问题 What are the differences between those amqp client libraries? Which one is the most recommended? What are the major differences? 回答1: I would recommend amqp.node and bramqp over node-amqp. node-amqp has a lot of bugs and is poorly maintained, and it hides the "channel" concept which introduces a lot of problems for rabbitmq servers (because they are never closed). 回答2: I'm the guy that wrote the bramqp library. So I'm going to admit from the start I may be a bit biased. :P In my opinion, as

Java RabbitMQ client hangs on resend via thread of producer commit callback after nack due to non-existent exchange

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently experimenting with failure scenarios that might happen when communicating via the message broker RabbitMQ. The goal is to evaluate how such communication can be made more resilient. In particular, I want to trigger a nack (not-acknowledge) confirm when sending messages in producer-commit mode . To do so, I send a message to a non-existent exchange via Spring AMQP's RabbitTemplate.send . In the callback provided via RabbitTemplate.setConfirmCallback , I then handle ack=false confirms by resending the message to an existing

How to retract a message in RabbitMQ?

孤街浪徒 提交于 2019-12-03 00:44:09
I've got something like a job queue over RabbitMQ and, upon a request to cancel a job, I'd like to retract the tasks that have not yet started processing (their messages have not been ack'd), which corresponds to retracting these messages from the queues that they've been routed to. I haven't found this functionality in AMQP or in the RabbitMQ API; perhaps I haven't searched well enough? Or will I have to use a workaround (it's not hard, but still)? I would solve this scenario by having the worker check some sort of authoritative data source to determine if the the job should proceed or not.