QueuedClosure
class QueuedClosure (View source)
Properties
| Closure | $closure | The underlying Closure. |
|
| string|null | $connection | The name of the connection the job should be sent to. |
|
| string|null | $queue | The name of the queue the job should be sent to. |
|
| string|null | $messageGroup | The job "group" the job should be sent to. |
|
| SerializableClosure|null | $deduplicator | The job deduplicator callback the job should use to generate the deduplication ID. |
|
| DateTimeInterface|DateInterval|int|null | $delay | The number of seconds before the job should be made available. |
|
| array | $catchCallbacks | All of the "catch" callbacks for the queued closure. |
Methods
Set the desired connection for the job.
Set the desired queue for the job.
Set the desired job "group".
Set the desired job deduplicator callback.
Details
__construct(Closure $closure)
Create a new queued closure event listener resolver.
$this
onConnection(UnitEnum|string|null $connection)
Set the desired connection for the job.
$this
onQueue(UnitEnum|string|null $queue)
Set the desired queue for the job.
$this
onGroup(UnitEnum|string $group)
Set the desired job "group".
This feature is only supported by some queues, such as Amazon SQS.
$this
withDeduplicator(callable|null $deduplicator)
Set the desired job deduplicator callback.
This feature is only supported by some queues, such as Amazon SQS FIFO.
$this
delay(DateTimeInterface|DateInterval|int|null $delay)
Set the desired delay in seconds for the job.
$this
catch(Closure $closure)
Specify a callback that should be invoked if the queued listener job fails.
Closure
resolve()
Resolve the actual event listener callback.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.