Task queue mixin for Moleculer microservice framework, backed by graphile-worker running on PostgreSQL. Version 0.3.0 is current; the package follows a slow release cadence. It allows defining job handlers as queue properties and provides methods for job creation, with a configurable producer/consumer model. Main differentiator: tight integration with Moleculer's mixin system, automatic logging, and lifecycle management.
npm install moleculer-psql-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Moleculer microservice with graphile-worker job queue mixin, defining two task handlers and configuring the database connection from environment variable.
Run `npx graphile-worker -c "<connection-string>" --schema-only` before starting the service.
Wrap call: `mixins: [PsqlQueueService(connectionString, options)]`
Upgrade Node.js to v20+.
Create a .d.ts file with `declare module 'moleculer-psql-queue';`
Run `npm install moleculer-psql-queue` and verify the import statement.
Use `const PsqlQueueService = require('moleculer-psql-queue')` or ES default import.Execute `npx graphile-worker -c "<connection>" --schema-only`