When a Worker is instantiated, the most common usage is to specify a process function. Sometimes however, it is useful to be able to specify more than one function to process a job for a specific condition.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/taskforcesh/bullmq/llms.txt
Use this file to discover all available pages before exploring further.
Using Switch Statements
You can use a simple switch case to differentiate your logic based on the job name:Benefits of This Pattern
- Single Worker Instance: Manage multiple job types without creating separate workers
- Shared Resources: All job types can share connections, configuration, and state
- Simple Logic: Easy to understand and maintain
Related Resources
Workers
Learn about worker creation and configuration
Job Types
Understand job data and naming
