Getting Queue Metadata
Use thegetMeta method to retrieve all queue metadata:
Method Signature
Example
Metadata Fields
The metadata object contains the following fields:The global concurrency limit, if set. This determines the maximum number of jobs that can be processed simultaneously across all workers.See Global Concurrency for more details.
The maximum number of jobs allowed in the rate limit window, if rate limiting is enabled.See Global Rate Limit for more details.
The duration (in milliseconds) of the rate limit window, if rate limiting is enabled.See Global Rate Limit for more details.
Whether the queue is currently paused. When paused, no new jobs will be processed.
The maximum length of the events stream. Default is 10,000 events.
The BullMQ library version that created or last updated the queue metadata, in the format
bullmq:x.y.z.Example Output
Practical Examples
Example 1: Health Check
Create a health check endpoint that includes queue metadata:Example 2: Monitoring Dashboard
Example 3: Configuration Validation
Verify queue configuration matches expectations:Example 4: Version Checking
Ensure queue was created with a compatible BullMQ version:Example 5: Pause Status Monitor
Metadata vs Other Queue Methods
Pause State
You can check pause state via metadata or a dedicated method:Global Concurrency
Global Rate Limit
Metadata Storage
Queue metadata is stored in Redis under a hash key:- Call
setGlobalConcurrency() - Call
setGlobalRateLimit() - Call
pause()orresume() - Create a new queue instance
