amqp

Spring integration: how to handle exceptions in services after an aggregator?

人盡茶涼 提交于 2019-12-05 10:13:06
I have an application relying on Spring Integration (4.0.4.RELEASE) and RabbitMQ. My flow is as follow: Messages are put in queue via a process (they do not expect any answer): Gateway -> Channel -> RabbitMQ And then drained by another process: RabbitMQ --1--> inbound-channel-adapter A --2--> chain B --3--> aggregator C --4--> service-activator D --5--> final service-activator E Explanations & context The specific thing is that nowhere in my application I am using a splitter: aggregator C just waits for enough messages to come, or for a timeout to expire, and then forwards the batch to service

How to listen to multiple queues with autowired Spring Boot?

我与影子孤独终老i 提交于 2019-12-05 08:59:49
I'm new to Spring boot and I'm playing around with it. Currently I've build some apllications that I want to be able to communicate with each other through queues. I currently have a Listener object that can receive message from a particular queue. @Configuration public class Listener { final static String queueName = "myqueue"; @Bean SimpleMessageListenerContainer container(ConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) { SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setConnectionFactory(connectionFactory); container

Microservice, amqp and service registry / discovery

百般思念 提交于 2019-12-05 08:15:39
I m studying Microservices architecture and I m actually wondering something. I m quite okay with the fact of using (back) service discovery to make request able on REST based microservices. I need to know where's the service (or at least the front of the server cluster) to make requests. So it make sense to be able to discover an ip:port in that case. But I was wondering what could be the aim of using service registry / discovery when dealing with AMQP (based only, without HTTP possible calls) ? I mean, using AMQP is just like "I need that, and I expect somebody to answer me", I dont have to

Moving messages between queues rabbitMQ

微笑、不失礼 提交于 2019-12-05 08:02:44
I am looking to be able to move messages between queues (manually) in Rabbit. For example: first-queue has messages ['a','b','c','d','e','f'] second-queue has messages ['x','y'] I want to be able to move for example message 'a' to second-queue from first-queue. This can be a manual operation. Both queues are on the same broker, and I do not want to send them through any exchange. Is there anyway to do this? I have been playing with rabbitmqctl but can't seem to get it to work. I am open to any other tools that would allow me to accomplish this. Eventually I am hoping to have some sort of

RabbitMQ - Does one consumer block the other consumers of the same queue?

无人久伴 提交于 2019-12-05 07:08:40
I'm in a phase of learning RabbitMQ/AMQP from the RabbitMQ documentation. Something that is not clear to me that I wanted to ask those who have hands-on experience. I want to have multiple consumers listening to the same queue in order to balance the work load. What I need is pretty much close to the "Work Queues" example in the RabbitMQ tutorial . I want the consumer to acknowledge message explicitly after it finishes handling it to preserve the message and delegate it to another consumer in case of crash. Handling a message may take a while. My question is whether AMQP postpones next message

Rabbitmq retrieve multiple messages using single synchronous call using .NET

夙愿已清 提交于 2019-12-05 06:21:17
Is there a way to receive multiple message using a single synchronous call using .NET? I've seen question and I've found java class com.rabbitmq.client.QueueingConsumer , but I haven't found such client class in .NET namespaces (RabbitMQ.Client, RabbitMQ.Client.Events) You can retrieve as many messages as you want using the BasicQoS.PrefetchCount : var model = _rabbitConnection.CreateModel(); // Configure the Quality of service for the model. Below is how what each setting means. // BasicQos(0="Dont send me a new message untill I’ve finshed", _fetchSize = "Send me N messages at a time", false

Dead letter exchange RabbitMQ dropping messages

白昼怎懂夜的黑 提交于 2019-12-05 04:54:59
I'm trying to implement a dlx queue in RabbitMQ. The scenario is quite easy I have 2 queues: 1) alive 2) dead (x-dead-letter-exchange: "immediate", x-message-ttl: 5000) and an exchange "immediate" that is bound to 1) alive I tried to run this example: http://blog.james-carr.org/2012/03/30/rabbitmq-sending-a-message-to-be-consumed-later/ but it seems that the messages are dropped after the ttl expires and they dont get published on the exchange, so my alive queue is always empty. I also tried to create the queues by hand in the management console and I get the same behaviour. I tested it with

Rabbitmq message arrival time stamp

烈酒焚心 提交于 2019-12-05 03:41:19
Is there a way to get the timestamp when a message was placed on the queue, from a consumer. Not when it was published, but when it actually made it to the queue. No there's no way to figure this out, unless, as you state yourself you write a plugin for this. There is nothing in the AMQP specification that says that the message must know when it arrived in the queue. There is no need from the AMQP point of view to know this. There are also many cases when the message might pass through several queues and then which queue should represent the relevant timestamp? A duplicate question has a good

Exception 'The AMQP operation was interrupted' (code=406) occurs in .NET Client programming

半世苍凉 提交于 2019-12-05 03:16:43
I have a 2.8.2 RabbitMQ Server and a 2.8.2 client dll, have the code to declare a queue and get a message, it works correctly (all parameters are correct): IModel channel=null; ConnectionFactory factory = new ConnectionFactory (); factory.HostName = "192.168.68.4"; _QueueName = "172.16.1.1"; factory.UserName = "guest"; factory.Password = "guest"; factory.VirtualHost = "/"; factory.RequestedHeartbeat = 30; if (factory.Endpoint == null) { Console.WriteLine (" factory.Endpoint==null "); } // 接受消息的队列名称是本地的IP地址 _QueueName = "172.16.1.1"; _RMQConnection = factory.CreateConnection (); Console

ubuntu 12.04安装配置rabbitmq

旧时模样 提交于 2019-12-05 03:14:50
ubuntu 12.04安装配置rabbitmq 在安装rabbitmq之前,需要先安装一些依赖关系,比如erlang,下面介绍安装方法: 一. 安装erlang 1.安装依赖关系包 sudo apt-get install build-essential libncurses5-dev m4 libssl-dev unixodbc unixodbc-dev libc6 freeglut3-dev libwxgtk2.8-dev xsltproc fop g++ build-essential 2.下载源码包 wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_19.1-2~ubuntu~precise_i386.deb 3.安装 sudo dpkg -i esl-erlang_19.1-2~ubuntu~precise_i386.deb 4.验证安装成功 erl   输出如下信息: Erlang /OTP19 (erts-8.1) [source-77fb4f8] [async-threads:10] [hipe] [kernel-poll:false] Eshell V8.1 (abort with ^G) 1> 二. 安装rabbitmq