Platformatic Queue
Configure Platformatic Job Queue with local or self-hosted workers.
Platformatic Queue fits local development and self-hosted deployments where you want full control over workers, storage, and queue lifecycle. Platformatic is the most flexible queue provider in ViteHub when you need to inspect or manage the worker directly.
Install the SDK
Terminal
pnpm add https://pkg.pr.new/nuxt-hub/agent/@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
| Concern | Behavior |
|---|---|
| Storage | queue.storage defaults to memory for discovered queues and can be changed to file or redis. |
| Runtime control | The provider handle can start(), stop(), waitFor(), getStatus(), cancel(), and inspect results directly. |
| Batch and worker methods | Platformatic 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.