amqp

Unable to connect to Apache ActiveMQ with Node.js

ⅰ亾dé卋堺 提交于 2019-12-23 03:49:11
问题 Background Trying to connect to my Apache ActiveMQ broker using the AMQP 1.0 protocol via amqp10. I am using the following code (adapted from the original example in the README): const AMQPClient = require("amqp10").Client; const Promise = require("bluebird"); //Fix from: https://github.com/noodlefrenzy/node-amqp10/issues/241 const activeMQPolicy = require("amqp10").Policy; const client = new AMQPClient(activeMQPolicy.ActiveMQ); const setUp = () => { return Promise.all([ client.createReceiver

RabbitMQ Spring Boot Session Error

旧城冷巷雨未停 提交于 2019-12-22 12:41:12
问题 I am running into an issue when trying to pass a RabbitMQ queue message to my Spring Boot application. I am running spring data 4 and am using Neo4j as my database. I am able to recieve and parse a JSON string from the RabbitMQ queue to the spring boot app. Here is the thread change for the receiver process: 14:19:17.811 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8080 (http) 14:19:17.813 [main] INFO org.directoryx.Application - Started Application in 4

AMQP/RabbitMQ - Process messages sequentially

夙愿已清 提交于 2019-12-22 11:12:40
问题 I have one direct exchange. There is also one queue, bound to this exchange. I have two consumers for that queue. The consumers are manually ack'ing the messages once they've done the corresponding processing. The messages are logically ordered/sorted, and should be processed in that order. Is it possible to enforce that all messages are received and processed sequentially accross consumer A and consumer B? In other words, prevent A and B from processing messages at the same time. Note: the

How to use RabbitMQ list of hosts connection parameter

天大地大妈咪最大 提交于 2019-12-22 10:23:23
问题 I'm trying to use the IList<string> parameter when creating a connection in the C# rabbitMQ library: IConnection CreateConnection(IList hostnames) My code is as follows: private IConnection CreateConnection() { var connectionFactory = new ConnectionFactory { UserName = _userName, Password = _password, VirtualHost = _vhost, AutomaticRecoveryEnabled = DEFAULT_AUTO_RECOVER, RequestedHeartbeat = HEARTBEAT_TIMEOUT_SECONDS, Port = AmqpTcpEndpoint.UseDefaultPort, }; // _hosts contains valid IPs "###

how to upload a file from php to amqp

被刻印的时光 ゝ 提交于 2019-12-22 10:06:19
问题 i want to know... how can i send a file to a rabbitmq queue from php. i have gone through many examples most of them didnt work. below is a consumer producer example which is near to working. Below is a the publisher.php <?php require_once('../php-amqplib/amqp.inc'); include('../config.php'); $conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST); $channel = $conn->channel(); $channel->exchange_declare('upload-pictures','direct', false, true, false); $metadata = json_encode(array( 'image

Is Spring-AMQP re-queue message count JVM based?

元气小坏坏 提交于 2019-12-22 08:13:10
问题 I was poking around the rabbitmq documentation, and it seems that rabbitmq does not handle message redelivery count. If I were to manually ACK/NACK messages, I would need to either keep the retry count in memory (say, by using correlationId as the unique key in a map), or by setting my own header in the message, and redelivering it (thus putting it at the end of the queue) However, this is a case that spring handles. Specifically, I am referring to RetryInterceptorBuilder.stateful()

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

自作多情 提交于 2019-12-22 07:24:08
问题 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

Moving messages between queues rabbitMQ

房东的猫 提交于 2019-12-22 05:43:10
问题 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

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

南笙酒味 提交于 2019-12-22 05:13:28
问题 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

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

橙三吉。 提交于 2019-12-22 04:30:34
问题 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 "); } //