class OutboxWorker

Methods

__construct(DatabaseOutboxRepository $repository, OutboxRelay $relay, Factory $cache, ExceptionHandler $exceptions, SignalRegistry $signals)

Create a worker with invocation-local admission and shutdown state.

int
run(string|null $database, OutboxWorkerOptions $options)

Relay committed work until the requested limit or shutdown condition is reached.

array|null
claim(string $database, int $limit)

Report a failed claim after its database-owning coroutine has ended.

int|null
restartTimestamp()

Read the restart signal without retaining a cache connection on the coordinator.

void
join(WaitConcurrent $concurrent)

Join every owned task before propagating cancellation, including repeated cancellation during cleanup.

Details

at line 26
__construct(DatabaseOutboxRepository $repository, OutboxRelay $relay, Factory $cache, ExceptionHandler $exceptions, SignalRegistry $signals)

Create a worker with invocation-local admission and shutdown state.

Parameters

DatabaseOutboxRepository $repository
OutboxRelay $relay
Factory $cache
ExceptionHandler $exceptions
SignalRegistry $signals

at line 38
int run(string|null $database, OutboxWorkerOptions $options)

Relay committed work until the requested limit or shutdown condition is reached.

Parameters

string|null $database
OutboxWorkerOptions $options

Return Value

int

at line 172
protected array|null claim(string $database, int $limit)

Report a failed claim after its database-owning coroutine has ended.

Parameters

string $database
int $limit

Return Value

array|null

null indicates a source failure

at line 195
protected int|null restartTimestamp()

Read the restart signal without retaining a cache connection on the coordinator.

Return Value

int|null

at line 212
protected void join(WaitConcurrent $concurrent)

Join every owned task before propagating cancellation, including repeated cancellation during cleanup.

Parameters

WaitConcurrent $concurrent

Return Value

void