Skip to main content

PKU384: Missing Queue Name

Error Message

[PKU384] No 'queueName' provided for queue processor function '[functionName]'.

What Went Wrong

You're trying to register a queue worker without specifying which queue it should process. Every queue worker needs a queueName to know which queue to listen to.

How to Fix

Add a queueName property to your queue worker:

import { addQueueWorker } from '@pikku/core/queue'
import { pikkuFunc } from '#pikku'

addQueueWorker({
queueName: 'email-queue', // ✅ Add this
func: pikkuFunc(async (job: { to: string; subject: string }) => {
// Process email job
console.log(`Sending email to ${job.to}`)
}),
})

Queue Name Guidelines

  • Use descriptive, kebab-case names (e.g., email-queue, image-processing)
  • Be consistent across your application
  • Consider using a naming convention like [domain]-[action]-queue

Common Patterns

// Single queue for a specific task
addQueueWorker({
queueName: 'email-notifications',
func: emailProcessor,
})

// Multiple workers for the same queue (parallel processing)
addQueueWorker({
queueName: 'data-processing',
func: dataProcessor1,
})

addQueueWorker({
queueName: 'data-processing', // Same queue name
func: dataProcessor2,
})

// Priority queues
addQueueWorker({
queueName: 'high-priority-tasks',
func: highPriorityProcessor,
})

addQueueWorker({
queueName: 'low-priority-tasks',
func: lowPriorityProcessor,
})

Common Mistakes

  • Omitting the queueName property
  • Using an empty string as the queue name
  • Misspelling the property as queue or name instead of queueName