Expand description
Message utility helpers
This module provides convenient helper functions for common message operations.
Functionsยง
- can_
retry - Check if a message should be retried based on retry count
- clone_
with_ new_ id - Clone a message with a new task ID (useful for retries or re-queuing)
- create_
retry_ message - Create a retry message with incremented retry count
- exponential_
backoff - Calculate exponential backoff delay for retries
- filter_
by_ task - Filter messages by task name pattern
- group_
by_ task - Group messages by task name
- is_
message_ expired - Check if a message is expired based on current time
- is_
ready_ to_ execute - Check if a message should be executed now (ETA has passed)
- message_
age - Calculate the age of a message based on its ETA or expires timestamp
- sort_
by_ eta - Sort messages by ETA (earliest first)
- sort_
by_ priority - Sort messages by priority (highest first)
- time_
until_ eta - Get the time remaining until a message should be executed
- time_
until_ expiration - Get the time remaining until a message expires
- validate_
batch - Validate multiple messages in batch