Expand description
MySQL broker implementation for CeleRS
This broker uses MySQL with FOR UPDATE SKIP LOCKED for reliable,
distributed task queue processing. It supports:
- Priority queues
- Dead Letter Queue (DLQ) for permanently failed tasks
- Delayed task execution (enqueue_at, enqueue_after)
- Prometheus metrics (optional
metricsfeature) - Batch enqueue/dequeue/ack operations
- Transaction safety
- Distributed workers without contention
- Queue pause/resume functionality
- DLQ inspection and requeue
- Task status inspection
- Database health checks
- Automatic task archiving
Modules§
- monitoring
- MySQL broker monitoring utilities
- utilities
- MySQL broker utility functions
Structs§
- Batch
Result Input - Batch result storage input
- Circuit
Breaker Config - Circuit breaker configuration
- Circuit
Breaker Stats - Circuit breaker statistics
- Connection
Diagnostics - Connection pool diagnostics
- DlqStatistics
- Dead Letter Queue statistics
- DlqTask
Info - Information about a dead-lettered task
- DlqTask
Stats - DLQ statistics per task name
- Health
Status - Database health status
- Hook
Context - Context passed to lifecycle hooks
- Idempotency
Config - Idempotency configuration
- Idempotency
Record - Idempotency key information for duplicate prevention
- Idempotency
Stats - Idempotency statistics per task type
- Index
Stats - Index usage statistics
- Migration
Info - Migration information
- Migration
Verification - Migration verification report
- Mysql
Broker - MySQL-based broker implementation using SKIP LOCKED
- Performance
Metrics - Performance metrics snapshot
- Pool
Config - Connection pool configuration
- Priority
Queue Stats - Priority queue statistics
- Query
Performance Profile - Query performance profile
- Query
Plan - Query execution plan information
- Query
Stats - Query performance statistics
- Queue
Health - Queue health summary combining multiple metrics
- Queue
Saturation - Queue saturation monitoring
- Queue
Statistics - Queue statistics
- Rate
Limit - Rate limit configuration per task type
- Rate
Limit Status - Rate limit status showing current usage
- Recurring
Task Config - Recurring task schedule configuration
- Retry
Policy - Advanced retry policy configuration
- Retry
Statistics - Retry statistics for understanding task failure patterns
- Scheduled
Task Info - Scheduled task information
- Slow
Query Info - Slow query information from performance_schema
- Table
Size Info - Table size information
- Task
AgeDistribution - Task age distribution for queue health monitoring
- Task
Chain - Task chain builder for creating dependent task sequences
- Task
Dependency - Task dependency for DAG execution
- Task
Execution Stats - Task execution time statistics
- Task
Group - Task group information
- Task
Group Status - Task group status
- Task
Hooks - Container for all registered hooks
- Task
Info - Information about a task in the database
- Task
Latency Percentiles - Task latency percentiles for SLA monitoring
- Task
Latency Stats - Task latency statistics
- Task
Name Count - Task count by task name
- Task
Progress - Task progress information for long-running tasks
- Task
Result - Task result stored in the database
- Task
State Transition - Task state transition record
- Task
Throughput - Task throughput metrics
- Trace
Context - W3C Trace Context for distributed tracing
- Worker
Heartbeat - Worker heartbeat information
- Worker
Statistics - Worker statistics for monitoring distributed workers
- Workflow
- Workflow definition
- Workflow
Builder - Workflow builder for creating complex DAG workflows
- Workflow
Stage - Workflow stage for parallel execution
- Workflow
Stage Builder - Workflow stage builder
- Workflow
Statistics - Workflow statistics
Enums§
- Circuit
Breaker State - Circuit breaker state for database connection resilience
- DbTask
State - Task state in the database
- Recurring
Schedule - Recurring schedule types
- Retry
Strategy - Retry strategy types
- Stage
State - Workflow stage state
- Task
Hook - Task lifecycle hook enum
- Task
Result Status - Task result status
- Worker
Status - Worker status
- Workflow
State - Workflow state
Type Aliases§
- HookFn
- Type alias for async lifecycle hook functions