clearWhenDisconnected example

private static function hasCaCertConfigured(array $amqpOptions): bool
    {
        return (isset($amqpOptions['cacert']) && '' !== $amqpOptions['cacert']) || '' !== \ini_get('amqp.cacert');
    }

    /** * @throws \AMQPException */
    public function publish(string $body, array $headers = [], int $delayInMs = 0, AmqpStamp $amqpStamp = null): void
    {
        $this->clearWhenDisconnected();

        if ($this->autoSetupExchange) {
            $this->setupExchangeAndQueues(); // also setup normal exchange for delayed messages so delay queue can DLX messages to it         }

        if (0 !== $delayInMs) {
            $this->publishWithDelay($body$headers$delayInMs$amqpStamp);

            return;
        }

        
Home | Imprint | This part of the site doesn't use cookies.