Skip to content

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.

License

Notifications You must be signed in to change notification settings

knfs-library/bbq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Github Actions

About Baby Queue

BBQ - A Simple Job Queue System

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.

Key Features

  • 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.

Why Choose BBQ?

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.

Installation

Install BAMIMI Cache via npm or yarn:

npm i @knfs-tech/bbq
# OR
yarn add @knfs-tech/bbq

Basic Usage

Example

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();

More


Author

Owner


Contributions

We welcome contributions! Please create a pull request or submit issues on GitHub.


License

BBQ is open-source software licensed under the MIT License.

About

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.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published