Monitoring Queue Statistics
Rqueue supports monitoring via the Micrometer library.
Gauge Metrics
Rqueue provides the following gauge metrics:
- queue.size: Number of tasks waiting to be processed.
- dead.letter.queue.size: Number of tasks in the dead letter queue.
- scheduled.queue.size: Approximate number of tasks scheduled for future execution.
- processing.queue.size: Approximate number of tasks currently being processed.
Execution and Failure Counters
Execution and failure counters can be enabled (disabled by default) by configuring RqueueMetricsProperties
.
rqueue.metrics.count.execution=true
rqueue.metrics.count.failure=true
Integration
Spring Boot Application
- Include Micrometer dependencies and relevant exporters.
- Set tags using
rqueue.metrics.tags.<name> = <value>
if needed. - Enable counting features as required.
Spring Application
- Include Micrometer dependencies and provide
MeterRegistry
as a bean. - Configure a
RqueueMetricsProperties
bean with necessary settings.