
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@cortec/rabbitmq
Advanced tools
@cortec/rabbitmq provides a robust integration with RabbitMQ for message queueing, publishing, and consuming. It supports multiple connections, automatic reconnection, error tracking with NewRelic, and consumer buffering. The module is designed to work seamlessly within the Cortec context and supports advanced features like prefetch control and custom error handling.
Configuration is provided via your config files (e.g., config/default.yml) under the rabbitmq key. Each connection is defined by an identity and must specify connection details.
rabbitmq:
myQueue:
connection:
protocol: amqp # or amqps
hostname: localhost # RabbitMQ server host
port: 5672 # RabbitMQ server port
username: guest # Username for authentication
password: guest # Password for authentication
Schema:
protocol: "amqp" or "amqps"hostname: RabbitMQ server hostnameport: RabbitMQ server port (number)username: Username for authenticationpassword: Password for authenticationimport RabbitMQ from '@cortec/rabbitmq';
// Instantiate the module (usually handled by Cortec context)
const rabbitmq = new RabbitMQ();
// After context is loaded:
const channel = rabbitmq.channel('myQueue');
// Send a message to a queue
channel.sendToQueue(
'jobs',
JSON.stringify({ type: 'process', payload: { id: 123 } })
);
// Consume messages from a queue
channel.consume('jobs', async (message) => {
const job = JSON.parse(message);
// Process job...
await doWork(job);
});
If your consumer throws a RabbitRejectError, the message will be nacked and not requeued. Other errors are tracked in NewRelic (if available) and the message is nacked and requeued.
import { RabbitRejectError } from '@cortec/rabbitmq';
channel.consume('jobs', async (message) => {
try {
// ...process message
} catch (err) {
if (shouldNotRequeue(err)) {
throw new RabbitRejectError('Do not requeue this message');
}
throw err;
}
});
You can set the prefetch count for a channel to control how many messages are fetched at once.
channel.prefetch(10); // Fetch up to 10 messages at a time
The module handles connection disposal and consumer unbinding automatically when the context is disposed.
For more advanced usage, refer to the implementation in src/index.ts and the configuration schema in your config files.
FAQs
RabbitMQ client for Cortec
We found that @cortec/rabbitmq demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.