dollarsignteam / nestjs-amqp Goto Github PK
View Code? Open in Web Editor NEWNestJS AMQP 1.0
License: MIT License
NestJS AMQP 1.0
License: MIT License
The below error is thrown from createSender()
in AMQPService
when sending message after the queue being idled for several days,
[ExceptionsHandler] Unable to create the amqp session due to operation timeout. - {"stack":["OperationTimeoutError: Unable to create the amqp session due to operation timeout.\n at Timeout.actionAfterTimeout (/app/node_modules/rhea-promise/lib/connection.ts:639:23)\n at listOnTimeout (node:internal/timers:557:17)\n at processTimers (node:internal/timers:500:7)"]}
My code:
const senderOptions: any = {
name: '${destination}:default:connection',
autosettle: true,
desired_capabilities: capabilities,
target: destination,
};
const sender = await this.amqp.createSender({
senderOptions: senderOptions,
});
if (!sender.session.isOpen()) {
if (!sender.session.connection.isOpen()) {
await sender.session.connection.open();
}
sender.session.begin();
}
const delivery = await sender.send({
durable: true,
message_id: uuid(),
body: message,
});
await sender.close();
Hello,
I am wondering how to handle failover, I need to handle multiple connection ,URLs and if one is unavailable need to connect to another one.
Thanks in advance.
Hello,
Is it possible to subscribe to all messages from the queue? Now, I need to send
const result = await this.producer.send<SimpleMessage>('demo3', message);
and subscribe to
@Consumer('demo3')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.