
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@fluojs/queue
Advanced tools
Redis-backed background job processing with worker discovery and DLQ support for Fluo.
English 한국어
Redis-backed distributed job processing for fluo. It features decorator-based worker discovery, JSON-safe job serialization, and lifecycle-managed execution.
npm install @fluojs/queue @fluojs/redis
Create a job class and a worker class decorated with @QueueWorker.
import { QueueWorker } from '@fluojs/queue';
export class ProcessOrderJob {
constructor(public readonly orderId: string) {}
}
@QueueWorker(ProcessOrderJob, { attempts: 3, backoff: { type: 'fixed', delayMs: 5000 } })
export class OrderWorker {
async handle(job: ProcessOrderJob) {
console.log(`Processing order: ${job.orderId}`);
// Your logic here
}
}
Import QueueModule and inject QueueLifecycleService to enqueue jobs.
QueueModule.forRoot(...) is the supported root entrypoint for application-level queue registration.
import { Module, Inject } from '@fluojs/core';
import { QueueModule, QueueLifecycleService } from '@fluojs/queue';
import { RedisModule } from '@fluojs/redis';
@Module({
imports: [
RedisModule.forRoot({ host: 'localhost', port: 6379 }),
QueueModule.forRoot(),
],
providers: [OrderWorker],
})
export class AppModule {}
export class OrderService {
@Inject(QueueLifecycleService)
private readonly queue: QueueLifecycleService;
async placeOrder(id: string) {
await this.queue.enqueue(new ProcessOrderJob(id));
}
}
Leave clientName unset to keep using the default @fluojs/redis client from your app. If your queues should use a non-default Redis connection, set clientName to the name registered with RedisModule.forRoot({ name, ... }).
QueueModule.forRoot({ clientName: 'jobs' })
@fluojs/queue resolves that Redis client during application bootstrap, then creates queue-owned duplicate connections for BullMQ. The shared @fluojs/redis client remains owned by RedisModule; Queue closes only the duplicate BullMQ connections it creates. Those duplicate connections are configured with BullMQ's required maxRetriesPerRequest: null worker setting so startup behavior matches BullMQ's runtime constraints.
Workers can be configured with a maximum number of attempts and backoff strategies to handle transient failures automatically.
@QueueWorker(MyJob, {
attempts: 5,
backoff: { type: 'exponential', delayMs: 1000 }
})
When a worker exhausts its retry attempts, Queue appends a dead-letter record to Redis (fluo:queue:dead-letter:<jobName>) for manual inspection or recovery. Queue does not move the BullMQ job itself.
QueueModule.forRoot() keeps the most recent 1_000 dead-letter entries per job by default. Set defaultDeadLetterMaxEntries: false to opt out, or provide a smaller positive number when operators need a tighter retention budget.
Jobs must be JSON-serializable plain objects. Queue serializes the job payload before enqueueing and rehydrates the job prototype on the worker side.
Treat low-level provider assembly as an internal implementation detail: low-level provider helpers are not part of the documented root-barrel contract.
QueueModule: Main entry point for queue registration.QueueModule.forRoot(options): Registers queue support for an application module.QueueLifecycleService: Primary service for enqueuing jobs (enqueue(job)).@QueueWorker(JobClass, options?): Decorator to mark a class as a job handler.QUEUE: Compatibility injection token for the queue facade.createQueuePlatformStatusSnapshot(...): Status snapshot helper for lifecycle/readiness diagnostics.QueueModuleOptions: Global queue settings (clientName, default attempts, defaultBackoff, concurrency, rate limiting, dead-letter retention).QueueWorkerOptions: Per-job settings (attempts, backoff, concurrency, jobName, rate limiting).QueueBackoffOptions: Retry backoff settings (type, delayMs).QueueModuleOptions also includes dead-letter retention controls such as defaultDeadLetterMaxEntries.
Only singleton @QueueWorker() providers/controllers are registered. Request/transient workers are skipped during discovery.
@fluojs/redis: Required as the backing store for job persistence.@fluojs/cron: For scheduled/recurring background tasks.packages/queue/src/module.test.ts: Worker discovery and enqueueing tests.packages/queue/src/public-surface.test.ts: Public API contract verification.packages/queue/src/status.test.ts: Queue lifecycle status snapshot tests.FAQs
Redis-backed background job processing with worker discovery and DLQ support for Fluo.
The npm package @fluojs/queue receives a total of 20 weekly downloads. As such, @fluojs/queue popularity was classified as not popular.
We found that @fluojs/queue 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.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.