
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
feathers-rabbit-queue
Advanced tools
A Feathers service addapter for RabbitMQ based on rabbit-queue
A Feathers amqp service adapter for Rabbit Queue.
$ npm install --save feathers-rabbit-queue
configure(options)
Configure RabbitMQ with Feathers application as new provider.
Options:
uri
(required) - Connection uri to RabbitMQprefetch
(optional, default: 1
) - Prefetch from queueprefix
(optional) - Prefix all queues with an application namesocketOptions
(optional, default: {}
) - Socket Options will be passed as a second param to amqp.connect and from there to the socket library (net or tls)queue
(optional, default: {retries: 3, retryDelay: 1000, logEnabled: true}
) - Queue optionsreconnectDelay
(optional, default: 1000
) - Delay before next reconnect attemptlogger
(optional, default: console
) - Output loggerHere's a example of configuration.
const compress = require('compression');
const helmet = require('helmet');
const cors = require('cors');
const feathers = require('@feathersjs/feathers');
const configuration = require('@feathersjs/configuration');
const express = require('@feathersjs/express');
const rabbitConfigure = require('feathers-rabbit-queue').configure;
const app = express(feathers());
// Load app configuration
app.configure(configuration());
// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({extended: true}));
// Set up Plugins and providers
app.configure(express.rest());
app.configure(
rabbitConfigure({
uri: 'amqp://user:pass@host:5672',
queueName: 'custom-queue-name',
logger: console
})
);
// Configure a middleware for 404s and the error handler
app.use(express.notFound());
app.use(express.errorHandler({logger}));
Send custom message through RabbitMQ.
Create
async function customFunctionWithAppReference(app) {
try {
const result = await app.rabbit.createMessage({path: 'path/to/somewhere', method: 'create', body: {}});
console.log('Got result:', result);
} catch (error) {
console.log('Got error:', error);
}
}
Patch
async function customFunctionWithAppReference(app) {
try {
const result = await app.rabbit.createMessage({
path: 'path/to/somewhere/id-to-patch',
method: 'patch',
body: 'id-to-patch',
data: {
attribute: 'value'
}
});
console.log('Got result:', result);
} catch (error) {
console.log('Got error:', error);
}
}
Remove
async function customFunctionWithAppReference(app) {
try {
const result = await app.rabbit.createMessage({
path: 'path/to/somewhere/id-to-remove',
method: 'remove',
body: 'id-to-remove',
query: {
attribute: 'value'
}
});
console.log('Got result:', result);
} catch (error) {
console.log('Got error:', error);
}
}
Message can be send to another Queue.
async function customFunctionWithAppReference(app) {
try {
const result = await app.rabbit.createMessage({queueName: 'another-custom-queue', path: 'example/id-of-this-example', method: 'update', body: {}});
console.log('Got result:', result);
} catch (error) {
console.log('Got error:', error);
}
}
FAQs
A Feathers service addapter for RabbitMQ based on rabbit-queue
The npm package feathers-rabbit-queue receives a total of 7 weekly downloads. As such, feathers-rabbit-queue popularity was classified as not popular.
We found that feathers-rabbit-queue 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.