Platformatic Queue

Configure Platformatic Job Queue with local or self-hosted workers.

Use Platformatic Queue for local development and self-hosted deployments where you want full control over workers, storage, and queue lifecycle.

Install the SDK

Terminal
pnpm add https://pkg.pr.new/vite-hub/vitehub/@vitehub/queue@main @platformatic/job-queue

Configure Platformatic

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@vitehub/queue/nuxt'],
  queue: {
    provider: 'platformatic',
  },
})

ViteHub defaults to { name: 'memory' } storage for discovered queues when you omit storage. Set storage only when you want file or redis, or when you want to make the default explicit.

Define a queue

server/queues/welcome-email.ts
import { defineQueue } from '@vitehub/queue'

export default defineQueue(async (job) => {
  return {
    id: job.id,
    queued: true,
    payload: job.payload,
  }
}, {
  cache: false,
})

What changes on Platformatic

ConcernBehavior
Storagequeue.storage defaults to memory for discovered queues and can be changed to file or redis.
Runtime controlThe provider handle can start(), stop(), waitFor(), getStatus(), cancel(), and inspect results directly.
Batch and worker methodsPlatformatic supports sendBatch(), execute(), reaper hooks, and other worker lifecycle methods.
Choose Platformatic when you want the most control over the queue worker and do not need a hosted queue platform.