Questions tagged [node-amqplib]

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

87 questions
0
votes
1 answer

amqplib sendToQueue() is not sending messages to RabbitMQ

I am building a Typescript package around amqplib's Promise API to make it simpler for me to send messages between two RabbitMQ queues. This is a method inside a class of said package that is responsible for sending a message to RabbitMQ. It's not…
Zenul_Abidin
  • 573
  • 8
  • 23
0
votes
2 answers

How to protect rabbitmq passwords when using rascal config file on nodejs

I'm trying to implement a NodeJS microservice, and I need it to use RabbitMQ. For the rabbit integration, I'm using 'rascal' (https://github.com/guidesmiths/rascal) since it solves lots of my concerns out of the box. I noticed that rascal is driven…
y-me
  • 277
  • 4
  • 13
0
votes
1 answer

Should node-ampqlib rabbitMQ channel be closed in following case?

I have defined enqueueMessage function to enqueue the message to rabbitMQ queue. In the first line of the function I am creating channel. Which means every time I call enqueueMessage a channel is created. Is this the right approach or should I…
Pavan Kumar
  • 1,715
  • 1
  • 24
  • 48
0
votes
1 answer

How can I get unacked messages count of a RabbitMQ queue using NodeJs (amqplib)

How can I get unacked messages count of a RabbitMQ queue using NodeJs (amqplib). we can easily get the total message count of a queue using checkQueue or assertQueue method. I have many dynamic queues and those queues are consumed by multiple…
0
votes
1 answer

How to execute a function after the execution of Nested async/awaits

I'm working with files and text. I'm using textract to extract the text out of documents and publishing the text using amqplib message-broker (if this isn't your thing, still you can answer). I have multiple async/await functions to run. After all…
Venkatesh Dharavath
  • 500
  • 1
  • 5
  • 18
0
votes
1 answer

debug library not working in conjunction with amqplib (rabbitmq)

We run our app in two "modes": Our REST API (express js) Our background processor (amqplib) Our REST API that starts using nodemon runs completely fine with debug, however our background processor does not work with debug. We declare DEBUG=app:*…
jm4mento
  • 31
  • 5
0
votes
1 answer

Is it possible for workers to consume based on topic?

I understand that you can send messages directly to a queue using channel.sendToQueue, and this creates a tasks-and-workers situation, where only one consumer will handle each task. I also understand that you can use channel.publish with a…
DaiBu
  • 529
  • 3
  • 17
0
votes
1 answer

Unsubscribe from a specific queue using node-amqplib on reconnect

problem: remote systems reconnect to multiple nodes websocket server, for each system a dedicated queue in RabbitMQ is created/used. The queues should be automatically removed if no active connections exist. Websocket connect/disconnect events…
0
votes
1 answer

RabbitMQ Queue Not Consumed Parallely By Multiple COnsumer Services

I am working on a NodeJS & RabbitMQ where - A Master NodeJS Service (one instance) Pushes the data in a queue. Slave NodeJS Services (multiple instances) consume the data and process it. Default exchange is being used. The slave service is running…
planet_hunter
  • 3,866
  • 1
  • 26
  • 39
0
votes
1 answer

How to manage publish connection per request on rabbitmq(rascal.js)

I am using Rascal.Js(it uses amqplib) for my messaging logic with rabbitMq on node.js app. I am using something similar to their example on my project startup, which creates a permanent instance and "registers" all of my subscribers and redirects…
Ivgi
  • 541
  • 1
  • 6
  • 21
0
votes
0 answers

Have a consumer listening to multiple queues, but it should consume all messages from queue A before queue B

I'm new to RabbitMQ and I'm still learning how it works. So far I managed to create two pieces of code (using the amqplib package for Node.js): a publisher that sends messages to queue A and queue B; and a consumer that consumes the messages from…
vegidio
  • 822
  • 2
  • 11
  • 32
0
votes
0 answers

How to implement rabbitMQ into node.js microservice app right way?

Greetings Stackoverflow. I've been using stackoverflow for years to find answers, and this is my first attempts to make a question myself. So feel free to tell me if I'm doing it wrong way. Currently I'm developing a data analytical system based on…
Psyke SPB
  • 29
  • 1
  • 5
0
votes
1 answer

How to extract msg from channel.consume

I was successfully consumed the message from rabbitmq, I can see the message if I add console.log(msg), but the problem is I can't get the msg outside the channel.consume I tried to assign it to variable but it's still didn't work const connection =…
virtualninja
  • 192
  • 3
  • 16
0
votes
3 answers

RabbitMQ reconnect logic is not working on abrupt restart of RabbitMQ server

My node application and RabbitMQ server are running on docker. That nodejs application have reconnect logic which works great when I gracefully restart RabbitMQ service by kill command in RabbitMQ container or by sudo docker-compose restart -t 10…
Alok
  • 7,734
  • 8
  • 55
  • 100
0
votes
1 answer

Promise with recursion, for AMQPLIB reconnection method

I am creating a method that reconnects to RabbitMQ (using amqplib), using recursion and returns a Promise that delivers the connection object. Here is what I have so far: function connectServiceBus() { return new Promise(function (resolve,…
Gene Myers
  • 1,230
  • 1
  • 14
  • 31