19 public readonly
string $queueId,
20 public readonly
string $handler,
22 public readonly ?
string $brokerCode,
37 if (!class_exists($this->handler))
40 sprintf(
'The class "%s" does not exist', $this->handler)
44 if (!is_subclass_of($this->handler, ReceiverInterface::class))
47 sprintf(
'The class "%s" does not implement "%s"', $this->handler, ReceiverInterface::class)
51 $brokerManager = ServiceLocator::getInstance()->get(BrokerManager::class);
54 $receiver = ServiceLocator::getInstance()->get($this->handler);
57 ->setQueueId($this->queueId)
58 ->setBroker($brokerManager->getBroker($this->queueId))
static requireModule($moduleName)
__construct(public readonly string $queueId, public readonly string $handler, public readonly string $moduleId, public readonly ?string $brokerCode, public readonly RetryStrategyInterface $retryStrategy)