
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
arque
A simple microservice framework based on RabbitMQ.
import Arque from 'arque';
const arque = new Arque();
arque.createWorker('echo', async message => {
return message;
});
const echo = arque.createClient('echo');
echo('Hello World!')
.then(message => {
assert.equal(message, 'Hello World!');
});
Arque
const arque = new Arque();
const arque = new Arque('amqp://localhost');
const arque = new Arque({
uri: 'amqp://localhost',
prefix: null
});
uri
- RabbitMQ URI. Default value is amqp://localhost
.prefix
- Queue name prefix. Default value is null
.arque.createWorker()
Creates a worker object.
const worker = arque.createWorker('echo', async message => {
return message;
});
const worker = arque.createWorker({
job: 'echo',
concurrency: 1
}, async message => {
return message;
});
job
- Job name. Required
concurrency
- Maximum number of jobs that can be executed concurrently. Default value is 1
.arque.createClient()
Creates a client object.
const client = arque.createClient('echo');
const client = arque.createClient({
job: 'echo',
timeout: 60000
});
job
- Job nametimeout
- Timeout time in milliseconds. Default value is 60000
;arque.close()
Close RabbitMQ connection.
Worker
worker.close()
Gracefully shut down the arque
worker.
Client
client.close()
Gracefully shut down the arque
client.
FAQs
A library for Event Sourcing
We found that arque demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.