QueueConcurrencyHandler
in package
implements
ConcurrencyHandler
Table of Contents
Interfaces
Properties
- $config : array<string|int, mixed>
- $requestContext : RequestContext|null
- $state : StateAdapter
Methods
- __construct() : mixed
- process() : void
- Process an incoming message, applying the concurrency strategy.
- dispatchAsync() : void
- dispatchDebounced() : void
- dispatchJob() : void
- processDropAsync() : void
- processSync() : void
Properties
$config read-only
private
array<string|int, mixed>
$config
= []
$requestContext
private
RequestContext|null
$requestContext
= null
$state read-only
private
StateAdapter
$state
Methods
__construct()
public
__construct(StateAdapter $state[, array<string|int, mixed> $config = [] ]) : mixed
Parameters
- $state : StateAdapter
- $config : array<string|int, mixed> = []
process()
Process an incoming message, applying the concurrency strategy.
public
process(Adapter $adapter, string $threadId, Message $message, callable $processCallback[, ServerRequestInterface|null $request = null ]) : void
Parameters
- $adapter : Adapter
-
The platform adapter
- $threadId : string
-
The canonical thread ID
- $message : Message
-
The incoming message (post-dedup, post-middleware)
- $processCallback : callable
-
fn(Adapter, string $threadId, Message, array $skippedMessages, int $totalSinceLastHandler): void
- $request : ServerRequestInterface|null = null
-
The original PSR-7 request (for job serialization)
dispatchAsync()
private
dispatchAsync(Strategy $strategy, Adapter $adapter, string $threadId, Message $message, int $debounceMs) : void
Parameters
dispatchDebounced()
private
dispatchDebounced(Adapter $adapter, string $threadId, Message $message, int $debounceMs) : void
Parameters
dispatchJob()
private
dispatchJob(Adapter $adapter, string $threadId, Message $message) : void
Parameters
processDropAsync()
private
processDropAsync(string $lockKey, Adapter $adapter, string $threadId, Message $message) : void
Parameters
processSync()
private
processSync(string $lockKey, Adapter $adapter, string $threadId, Message $message, callable $processCallback) : void