public function registerEndpointForMessages(Endpoint $endpoint, string ...$messages): self
    {
        /**
         * @noinspection PhpUnhandledExceptionInspection
         *
         * @var EndpointRouter $entryPointRouter
         */
        $entryPointRouter = $this->getKernelContainerService(EndpointRouter::class);

        /** @psalm-var class-string $messageClass */
        foreach ($messages as $messageClass)
        {
            $entryPointRouter->registerRoute($messageClass, $endpoint);
        }

        return $this;
    }