
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
@amqc/client
Advanced tools
A simple and elegant AMQP client written by TypeScript
Inspired by amqp-ts
import * as amqp from '@amqc/client';
// const amqp = require("@amqc/client"); // js require
async function run() {
const connection = new amqp.Connection('amqp://localhost');
const exchange = connection.declareExchange('ExchangeName');
const queue = connection.declareQueue('QueueName');
await queue.bind(exchange);
await queue.consume(message => {
console.log('Message received: ' + message.getContent());
});
// it is possible that the following message is not received because
// it can be sent before the queue, binding or consumer exist
const msg = new amqp.Message('Test');
exchange.send(msg);
await connection.ready();
// the following message will be received because
// everything you defined earlier for this connection now exists
const msg2 = new amqp.Message('Test2');
exchange.send(msg2);
}
run().catch(console.error);
More examples can be found in the tutorials directory.
connection.connected
: Returns true if the connection exists and false, otherwise.connection.online()
: Resolved when connected.connection.ready()
: Resolved when connected and all resources(actors) has been ready.When the library detects that the connection with the AMQP server is lost, it tries to automatically reconnect to the server.
It is powered by connback.
FAQs
A type-safe AMQP client with auto-reconnect and auto-declare
The npm package @amqc/client receives a total of 0 weekly downloads. As such, @amqc/client popularity was classified as not popular.
We found that @amqc/client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.