declareExchange example

return $this->queue($queueName)->nack($message->getDeliveryTag()$flags) ?? true;
    }

    public function setup(): void
    {
        $this->setupExchangeAndQueues();
        $this->setupDelayExchange();
    }

    private function setupExchangeAndQueues(): void
    {
        $this->exchange()->declareExchange();

        foreach ($this->queuesOptions as $queueName => $queueConfig) {
            $this->queue($queueName)->declareQueue();
            foreach ($queueConfig['binding_keys'] ?? [null] as $bindingKey) {
                $this->queue($queueName)->bind($this->exchangeOptions['name']$bindingKey$queueConfig['binding_arguments'] ?? []);
            }
        }
        $this->autoSetupExchange = false;
    }

    private function setupDelayExchange(): void
    {
Home | Imprint | This part of the site doesn't use cookies.