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
1
vote
1 answer

I am getting an error when i run my node.js app ( also using rabbit )

Error: Cannot find module 'amqplib/callback_api' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15) at Function.Module._load (internal/modules/cjs/loader.js:475:25) at Module.require…
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
1
vote
0 answers

amqplib nodejs to consume rabbitmq

this is how i consume the queue in rabbit, i wonder why this promise still hangs and return no result. i am trying to hit an endpoint that call this promise and expect it to return just ok to make sure it gives me a 200 OK status. now it acts like…
kenlz
  • 461
  • 7
  • 22
1
vote
2 answers

How to put a message at the end of MQRabbit Queue

I'm working on a worker which is able to treat message from a RabbitMQ. However, I am unsure of how to accomplish this. If I receive a message and during my treating an error occurs, how can I put the message into the end of the queue? I'm trying…
Clowning
  • 178
  • 4
  • 16
1
vote
2 answers

High performance on Nodejs RabbitMQ server

I'm building an analysis system with a million users online in the same time. I use RabbitMQ such as message broker to reduce capacity for server Here is my diagram My system include 3 components. Publisher server : ( Producer ) This system was…
Loint
  • 3,560
  • 7
  • 26
  • 46
1
vote
1 answer

rabbitmq - prefetch count per consumer

I would like to use the node-amqp library the create multiple consumers for RabbitMQ, but I can't understand whether the prefetch-count option refers to count per consumer or not. I would like each consumer to have its own prefetch count that does…
Mister_L
  • 2,469
  • 6
  • 30
  • 64
1
vote
2 answers

Why do I need a Queue in RabbitMQ publishing?

I am using Node.js with node-amqp to create a simple message queue. Most examples that I see do the following: Create a connection Create an exchange Creat a Queue and Bind it to the Exchange Publish via the Exchange In my code, I omit the queue…
Mike M
  • 4,879
  • 5
  • 38
  • 58
1
vote
1 answer

Channel pooling strategy for AMQP using NodeJS

To publish messages to RabbitMQ (acknowledged, persistent) from a NodeJS publisher (I'm using bramqp, but the question is generic), what should be channel pooling strategy? If I create a huge pool (20,000 +) and look out for a free channel every…
Confused
  • 617
  • 1
  • 9
  • 17
1
vote
0 answers

How to check if a queue already exists or not in node.js amqp client?

I have a following scenario. I want to implement pub/sub model of rabbitmq using amqp client. I have subscribers who subscribe for a particular id. I want to form a queue on teh name of that id. So that all the subscribers who want to subscribe to…
Ankush Sharma
  • 71
  • 1
  • 4
1
vote
1 answer

amqplib - How many consumers on a queue?

Using amqplib module for Node JS and RabbitMQ, 1) is there any way to tell how many subscribers there are on a queue? 2) How can i make each queue should have one consumer key? Thanks!
Prak
  • 175
  • 1
  • 7
1
vote
1 answer

Rabbitmq: different between envelop.message.body and envelop.message.pool

I have one producer based on nodejs and the javascript library which I used is amqp.node, and the consumer is implemented by C library. From rabbitmq management web, I can see the messages are pushed into the queue and delivered to the consumer. In…
zangw
  • 43,869
  • 19
  • 177
  • 214
1
vote
0 answers

Cannot connect to an exchange in rabbitmq

I'm trying to achieve something very simple - connect to a RabbitMQ exchange and consume messages. I'm using https://github.com/postwait/node-amqp. Here's the NodeJS code. var rabbitMQ = amqp.createConnection({ host:…
TeknasVaruas
  • 1,480
  • 3
  • 15
  • 28
1
vote
2 answers

node.js AMQP not returning callback

I am using node AMQP module to connect to RabbitMQ. I am able to connect, create an exchange, queue and able to send/publish the message to the exchange. I can confirm the messages are published on the management console. Problem is I am not…
user3658423
  • 1,904
  • 5
  • 29
  • 49
1
vote
0 answers

node-amqp: Having trouble with two consumers subscribing to same queue one at a time

I have two consumers which need to process messages from same queue but only one of them at any time. A sequence of what I am trying to accomplish is like this: (start) None of the consumers have subscribed to the queue Consumer1 subscribes to…
rkr393
  • 11
  • 2
1
vote
1 answer

No exception when node-amqp

I'm trying to use node-amqp. When in the section of connection to rabbit an exception is thrown, I can get that exception but it restarts the connection to Rabbit forever. Look at that: amqp = require("amqp") # Open a connection conn…
Luman75
  • 878
  • 1
  • 11
  • 28