Questions tagged [node-amqp]

node-amqp is an AMQP client for nodejs.

AMQP 0-9-1 library and client for Node.JS.

This library does not implement AMQP 1.0 or AMQP 0-10.

Github: https://github.com/squaremo/amqp.node

105 questions
2
votes
1 answer

Control consumption rate of RabbitMQ consumer using amqplib for Node.JS

My app uses a RabbitMQ queue to store messages, then I have a worker consuming those messages and inserting them in the database. The intention is not to stress the database in workload peaks. The problem I have is that in those peak the publish…
Manuel Campos
  • 33
  • 1
  • 5
2
votes
1 answer

node-amqp + socketio: how to synchronize queue subscribe/unsubscribe?

I have an angularjs app, with node and express on the server side. I also have node-amqp and socket.io I want to implement the following behaviour The app has a page (route, angular view) that displays a table with real-time data The data are…
klode
  • 10,821
  • 5
  • 34
  • 49
2
votes
1 answer

Why "close" event when something goes wrong with node-amqp?

(I am using node-amqp and rabbitmq server.) I am trying to guess why I have a close event if something goes wrong. For example, If I try to open a a connection to a queue (with bad parameters) I receive an error event. That it is perfect ok. But,…
jgato
  • 181
  • 1
  • 6
2
votes
1 answer

How to check for the existence of an exchange in RabbitMQ from node.js?

I want to check whether a particular RabbitMQ exchange exists or not from node.js. I am using Mocha as test framework. I have written code for the same but my expectation seems to be incorrect. I expect exchange variable to have a value of undefined…
Anand Patel
  • 6,031
  • 11
  • 48
  • 67
2
votes
1 answer

node-amqp queue destroyed: notifications to subscribers

I am using node-amqp and rabbit for some pub/sub tools. I would like to know if it is possible to notify subscribers when someone/something (in other process) has destroyed the queue where they are listening. For example, process…
jgato
  • 181
  • 1
  • 6
2
votes
1 answer

Why Rabbitmq cluster delivers messages to consumers in a Round-Robin fashion

I have 2 Rabbitmq nodes connected as a cluster (no queue replication), and have 4 workers, all are bound to the same queue "myqueue", now, I manually publish messages to that queue (the publisher can be connected to any of rabbit nodes .. doesn't…
securecurve
  • 5,589
  • 5
  • 45
  • 80
2
votes
1 answer

Wait until node-amqp has sent a message?

If I use the following code to send a message to RabbitMQ: var amqp = require('amqp'); var connection = amqp.createConnection(); connection.on('ready', function() { connection.publish('foo', 'Hello'); process.exit(); }); ...then the message is…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
2
votes
1 answer

Node-amqp example of Topic exchange

Does anyone have an example of creating a topic exchange in Node-amqp? I've already gone through https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/javascript-nodejs but unfortunately it doesn't recreate tutorials 4+ from the RabbitMQ…
RachelD
  • 4,072
  • 9
  • 40
  • 68
2
votes
1 answer

Meteor + node-amqp: unable to connect via SSL to RabbitMQ server

I am using node-amqp in a Meteor app to connect to a rabbitMQ server via SSL. Here is my connection string: var rConn = AMQP.createConnection({ url: amqps://user:pass@host:pppp, vhost: '/virthost' }); However, no connection is made. The following…
SpacePope
  • 1,423
  • 1
  • 15
  • 21
1
vote
1 answer

node-amqp exchange callback not being invoked

I have the following code . My node version is v0.7.0-pre . When I run the code the screen prints Setup Completed setup It does not print the Exchange Callback message . When I run the rabbitmqctl --list_exchanges command I see the new…
1
vote
1 answer

rabbitmq-node ECONNRESET on channel creation after successful connection has been established

I fresh installed rabbitmq and amqp-lib and imported var amqp = require('amqplib/callback_api'); amqp.connect('admin://admin:guest@localhost:5672',function(error0, connection) { console.log("ok") if (error0) { throw error0; } }); this…
1
vote
1 answer

connection string of RabbitMQ cluster using nodejs?

I am trying to connect to RabbitMQ cluster using nodejs library amqplib I cannot find any information on connection string. I am trying var amqp_url = …
user557657
  • 856
  • 1
  • 12
  • 35
1
vote
1 answer

Node.js connection with RabbitMQ

I am having a node.js application that uses amqlib to connect with RabbitMQ. I am trying to reproduce a connectivity error with RabbitMQ and I get two different errors by repeating the same flow. What I am doing is: Start a Docker container with…
Ilias Mentz
  • 500
  • 1
  • 7
  • 16
1
vote
1 answer

Node RabbitMQ consume message and do something for each message

I want to consume messages from a rabbitmq service and for each message I receive I want to do something (Ex: Put that message in to a database, Process the message and send a reply via RabbitMq through another queue) per message. Currently my…
Rumesh Madhusanka
  • 1,105
  • 3
  • 12
  • 26
1
vote
1 answer

Optimizing RabbitMQ consumers to consume in batch

I have an application where on every message consumption I need to query the MySQL database for some information and based on that process the consumed message. I would want to optimize this so as to prevent multiple queries on the database adding…
Aneesh Relan
  • 342
  • 3
  • 12