messageHasAlreadyBeenHandled example


        $handler = null;
        $message = $envelope->getMessage();

        $context = [
            'class' => $message::class,
        ];

        $exceptions = [];
        $alreadyHandled = false;
        foreach ($this->handlersLocator->getHandlers($envelope) as $handlerDescriptor) {
            if ($this->messageHasAlreadyBeenHandled($envelope$handlerDescriptor)) {
                $alreadyHandled = true;
                continue;
            }

            try {
                $handler = $handlerDescriptor->getHandler();
                $batchHandler = $handlerDescriptor->getBatchHandler();

                /** @var AckStamp $ackStamp */
                if ($batchHandler && $ackStamp = $envelope->last(AckStamp::class)) {
                    $ack = new Acknowledger(get_debug_type($batchHandler)static function D\Throwable $e = null, $result = null) use ($envelope$ackStamp$handlerDescriptor) {
                        
Home | Imprint | This part of the site doesn't use cookies.