PublishOptions
Options for publishing messages.
Structure
Builder
Methods
builder()
Creates a new PublishOptionsBuilder.
PublishOptionsBuilder
Builder for constructing PublishOptions.
ttl
Sets the time-to-live for the message.
Example:
priority
Sets the priority level (1-5, where 1 is highest).
Panics: If priority is not between 1 and 5.
Example:
delay
Sets a delay before message delivery.
Example:
schedule_at
Sets a specific delivery time.
Example:
build
Builds the PublishOptions.
ConsumeOptions
Options for consuming messages.
Structure
Builder
ConsumeOptionsBuilder
Builder for constructing ConsumeOptions.
auto_ack
Sets whether messages are auto-acknowledged.
Default: false
If auto_ack is true, calling acknowledge() or reject() will return an error.
fairness
Enables fairness queue consumption (Redis only).
Example:
consume_wait
Sets the wait duration between consume loop iterations.
This allows consumer loops to be interrupted by tokio.
Example:
handler_ack
Controls automatic acknowledgment after successful handler execution.
Default: true
Set to false to manually control acknowledgment:
build
Builds the ConsumeOptions.
RetryStrategy
Configuration for message retry behavior.
Structure
Default
Methods
new
Creates a new retry strategy with defaults.
with_attempts
Sets the maximum retry attempts.
Example:
retry_failed
Enables or disables retrying.
Example:
Usage
QueueStatus (management feature)
Status information for a queue.
Structure
Usage