BBQ is a lightweight and efficient job queuing system designed to integrate directly on local files of Node.js applications. With built-in support for job management, workers, and message handling, BBQ helps you streamline asynchronous task execution and improve the performance of your applications.
- Job Queue Management: Easily create and manage multiple job queues to handle asynchronous tasks efficiently.
- Worker Support: Utilize worker threads to process jobs concurrently, ensuring your application remains responsive and capable of handling high workloads.
- Retry Mechanism: Automatically retry failed jobs based on configurable settings, ensuring reliability in job processing.
- Timeout Handling: Set maximum execution times for jobs, allowing you to manage long-running tasks effectively.
- Flexible Configuration: Customize the behavior of your job queues with options for concurrency, logging, and job expiration.
- Event-Driven Architecture: Listen for events and process messages seamlessly, making it easy to integrate with other parts of your application.
Whether you're building a small application or a large-scale system, BBQ provides the tools you need to implement effective job processing strategies. Its simple API and robust features make it an ideal choice for developers looking to enhance their application's performance and reliability.
Install BAMIMI Cache via npm or yarn:
npm i @knfs-tech/bbq
# OR
yarn add @knfs-tech/bbq
const Dispatcher = require('bbq-cache');
const dispatcher = new Dispatcher({
log: true,
});
async function handleJob(job) {
console.log(job.message)
}
async function demo() {
await dispatch.setup();
const queue = await dispatcher.createQueue('queue-1');
const worker = dispatch.createWorker("worker-1")
worker.addJob("job-1", "queue-1", handleJob)
await queue.addMessage('Hello, World!');
await queue.addMessage({
msg: 'Hello, World'
nation: 'Vietnam'
});
await queue.addMessage(84);
}
demo();
We welcome contributions! Please create a pull request or submit issues on GitHub.
BBQ is open-source software licensed under the MIT License.