Questions tagged [node-amqplib]

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

87 questions
8
votes
2 answers

How to check whether the connection is alive or not in RabbitMq node-amqplib library?

I am writing producer & consumer using rabbitMq node-amqplib library, I am afraid about suddenly to lost connection of server , How could I check whether the connection is alive or not ?
mayur
  • 107
  • 1
  • 7
6
votes
4 answers

amqplib: Socket closed abruptly during opening handshake

What I am trying to do I try to create rabbit-mq publisher & subscriber. It works as expected until I try to restart my rabbit-mq server. What works I use rabbitmq:3-management docker image, ampqlib 5.3, and Node.js 11.10.0 to make this simple…
goFrendiAsgard
  • 4,016
  • 8
  • 38
  • 64
4
votes
1 answer

Set connection name with amqplib

I need to set a friendly name for my connection as below instead of "?" in RabbitMQ for amqplib for NodeJS: I found examples with Java and Python but nothing yet with this library. Thanks.
CarlosS
  • 161
  • 1
  • 13
4
votes
1 answer

Can I dynamically create RabbitMQ shovel from my NodeJS app?

RabbitMQ shovel plugin provides an HTTP API to create & configure shovels. Assuming that I have enabled shovel & shovel management plugin for my RabbitMQ server instance, can I dynamically create shovels from my NodeJS app? I currently use amqplib…
wraith
  • 391
  • 1
  • 14
4
votes
1 answer

Node.js amqplib - not able to implement the reconnect in case of connection close

I am trying to implement a reconnect mechanism when the connection fails to the rabbitmq queue server.This code is only for consuming messages, Below is my code ( the channel Init function takes care of initialising the consumer and binding to the…
Rangarajan K
  • 93
  • 3
  • 14
3
votes
2 answers

RabbitMQ / amqplib -- Error: Frame size exceeds frame max

Connection to RabbitMQ fails with Error: Frame size exceeds frame max. Although there are a few similar issues raised on StackOverflow and Github, but it is still very vague. One assumes that the version of AMQP used by RabbitMQ and amqplib differs,…
Roman Shirokov
  • 329
  • 4
  • 12
3
votes
1 answer

RabbitMQ. publishing message in loop

I'm using amqplib js lib. I have publisher (it publish messages in loop) and few workers. If I publish 1000000 messages I see how my messages firstly sending to rabbit, after that I'm receiving ack, and only after this message start consuming in…
evg.vis
  • 31
  • 6
3
votes
1 answer

rabbitMQ unit tests with amqplib-mocks library

I am trying to write unit tests with amqplib-mocks but i can not consume message from consumer, i am getting undefined and i try to debug but not successfull. describe("Rabbitmq testing Server", () => { let connection, channel; before(async…
U rock
  • 717
  • 2
  • 13
  • 32
3
votes
0 answers

How to separate heartbeat to its own thread for RabbitMQ connection

I have a process that uses RabbitMQ and NodeJS to do image processing. Due to the intensive task, I think I have the same issue as the link here https://github.com/squaremo/amqp.node/issues/261 I am trying to figure out how to implement the last…
Crash667
  • 343
  • 2
  • 16
3
votes
1 answer

Configuring socket timeout on amqplib connect

I'm running a cluster of 2 RabbitMQ servers (could be any number) and I have implemented a failover where my app loops the list of RabbitMQs and tries to reconnect when a connection drops. If the RabbitMQ instance is down which I'm trying to connect…
Mikko
  • 1,877
  • 1
  • 25
  • 37
2
votes
1 answer

What causes a promise using the first call variable value

I'm developing a AMQPClient class to abstract RPC calls, works perfectly on the first call, but when calling again the correlationId has the value of the first call. async RPC(queue: string, message: string): Promise { if (!this.channel)…
2
votes
2 answers

RabbitMQ: Ack/Nack a message on a channel that is closed and reopened

I'm getting this error from the RabbitMq server Channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - unknown delivery tag 80" This happends because the connection is lost during the consumer task and at the end,…
Oxenarf
  • 200
  • 6
  • 23
2
votes
0 answers

Reconnect with RabbitMQ using amqplib after rabbitMQ restarts

I have this rabbitmq connection code using which I have connected to the queue and using it. const amqp = require('amqplib'); class RabbitMq { constructor(connStr) { this.connStr = connStr; this.conn = null; this.channel =…
Baqir Khan
  • 694
  • 10
  • 25
2
votes
1 answer

Invalid wire type and index out of range errors when consuming a protobuf message from .net with protobufjs on nodejs

I am trying to consume a protobuf message from RMQ on node js. The protobuf message was created with protobuf-net on C#.Net So for example the c# object looks like this: [ProtoContract] public class PositionOpenNotification : MessageBase …
Mithir
  • 2,355
  • 2
  • 25
  • 37
2
votes
0 answers

Using Mocha for integration testing of a callback that should trigger when on an AMQP message received event

I have a Feathers application that is using RabbitMQ and a custom amqplib wrapper to communicate with some other code running elsewhere and I'm struggling to write a good integration test to show that the callback that runs when a message is…
Huggzorx
  • 144
  • 1
  • 13
1
2 3 4 5 6