AMQP 0-9-1 library and client for Node.JS
Questions tagged [node-amqplib]
87 questions
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
1
vote
1 answer
AMQPLIB - NodeJS - Asserting a Lazy Queue in RabbitMQ
I want to assert a queue in lazy mode into existence via amqplib using nodeJs.
I know I can do this by creating policies, I don't want to do that as its hard to automate right now in the environment we have.
I have tried the following:
let…

Sumit Maingi
- 2,173
- 3
- 24
- 44
1
vote
1 answer
Amqp, rabbit mq and socket.io reconnect to a queue even if client is closed
I'm coding a browser notification using rabbitMQ and socket.io. My configuration is working fine except for one case.
When i login to my system with a user it creates a notification-UID-userid queue (For now the queueName is sent by query oaraeter,…

Jack Skeletron
- 1,351
- 13
- 37
1
vote
2 answers
Connection Refused Error in RabbitMQ with amqplib npm module
I am new to RabbitMQ and I am trying out the simple example in Nodejs.
const amqp = require('amqplib/callback_api');
amqp.connect('amqp://guest:guest@localhost:15672',function(err,
conn) {
console.log("Enter in callback",conn);
if (err)…

Ankit Uniyal
- 424
- 1
- 7
- 20
1
vote
0 answers
Getting an error when subscribing a queue
My backend pushes messages to rabbitmq queue and I need to fetch those messages to display in the frontend part of the messages, since the messages have to be in specific order, I cannot use an asynchronous approach.
I have written this code
var…

Ciasto piekarz
- 7,853
- 18
- 101
- 197
1
vote
1 answer
How to understand the output of rabbitmqctl commands
$rabbitmqctl list_queues
Timeout: 60.0 seconds ...
Listing queues for vhost / ...
privateTransactionQ 2
amq.gen-o9dl3Zj7HxS50gkTC2xbBQ 0
task_queue 0
Output of rabbitmqctl looks like this. I cant make out what each column is meant for. How can I…

Sumanth
- 31
- 1
- 4
1
vote
2 answers
Why the nodejs with amqplib consume function is closure?
I use the nodejs amqplib module to connect rabbitmq.
I found the consume function is become a closure function, but I couldn't understand why. I didn't use closure.
My code is below. I found the corr in the returnOK still get the first time value.…

Rukeith
- 665
- 1
- 8
- 22
0
votes
0 answers
RabbitMQ in local machine: service rabbitmq-server restart
I have a production RabbitMQ system on a server on cloud and there is a Nodejs application which is using this RabbitMQ server.
The problem is the Nodejs application which is running on the cloud is connected fine to the RabbitMQ but the same Nodejs…

Abdol Seed
- 1,227
- 1
- 14
- 23
0
votes
0 answers
memory overconsumption in Node.js
I have implemented an amqplib consumer that is experiencing some issues related to memory overconsumption.
I'm unsure whether to classify it as a memory leak since, on one hand, the process seems to stabilize at a lower memory level, but on the…

Akheloes
- 1,352
- 3
- 11
- 28
0
votes
0 answers
Is it possible to read one rabbitmq stream message with a single service instance?
Is it possible to read stream messages one by one with a replicated consumer? If yes, how to do it?
My situation is: I have one service-consumer with 3 replications. I want it to read stream messages as like from queue, when one message is processed…

Yerbol Suleimanov
- 115
- 1
- 1
- 5
0
votes
0 answers
How can publisher waits for an answer from the receiver ? RabbitMQ and Nodejs
I have a question about RabbitMQ with nodeJS.
I have 3 microservices : gateway-ms, event-ms and account-ms.
the gateway is simple a proxy who redirects requests to corresponding microservice (account or event).
I would like, in a GET request inside…

Loick Tanvez
- 1
- 1
0
votes
0 answers
Getting basic Result null on RabbitMQ?
Here is the node.js code and I'm trying convert it to C# with RabbitMQ Client
amqp.connect('amqp://xxx-url').then(function(conn) {
process.once('SIGINT', function() { conn.close(); });
return conn.createChannel().then(function(ch) {
…

David
- 75
- 7
0
votes
0 answers
Can you have one consumer listen to multiple queues using AMQP/RabbitMq?
I currently have a pool of machines that produce widgets, and I am using RabbitMQ to route jobs to each machine based on a routing key using a topic exchange. For example, I can produce a message onto an exchange with a routing key of…

Simon Bowen
- 31
- 1
- 3
0
votes
0 answers
Reusing RabbitMQ connection per expressjs api request
We are trying to use rabbitmq using this library called amqplib (not node-amqplib). Now all docs and examples I read say the connections should be long term. So my original thought of as soo nas someone makes a request to our web server (express),…

Tanner Summers
- 689
- 1
- 8
- 26
0
votes
0 answers
How to refresh RabbitMQ credentials(JWT) dynamically
I'm using amqplib in my NodeJS project.
Instead of username:password I'm using JWT authentication. Which is basically an empty username and JWT token as a password. The rest is handled by the MQ server.
Auth works fine but when the JWT token expires…

n1md7
- 2,854
- 1
- 12
- 27