interface QueuePreferences

Defines the contract for event listeners or jobs that can be queued.

Implementing classes can control the queue name, delay, retry behavior, and maximum number of processing attempts for a queued task.

Methods

int|array
backoff()

Get the backoff time(s) between retry attempts.

int
delay()

Get the delay before the job/listener should be processed.

int
maxAttempts()

Get the maximum number of attempts for processing this job/listener.

string|null
viaQueue()

Get the name of the queue to send the job/event listener to.

Details

at line 18
int|array backoff()

Get the backoff time(s) between retry attempts.

Return Value

int|array

Number of seconds before retry, or an array of increasing delays (e.g., [10, 30, 60]) for multiple retries.

at line 25
int delay()

Get the delay before the job/listener should be processed.

Return Value

int

Delay in seconds or a UNIX timestamp representing when the job should be available.

at line 32
int maxAttempts()

Get the maximum number of attempts for processing this job/listener.

Return Value

int

Maximum retry attempts before the job/listener is marked as failed.

at line 39
string|null viaQueue()

Get the name of the queue to send the job/event listener to.

Return Value

string|null

The queue name (e.g., 'mail') or null to use the default queue.