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;
    }
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;
    }
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 ; }
Apply specific route to deliver a messages
By default, messages will be sent to the application transport. If a different option is specified for the
message, it will be sent only to it.

@noinspection PhpDocMissingThrowsInspection

@param Endpoint $endpoint
@param string   ...$messages

@return ServiceBusKernel
Apply specific route to deliver a messages By default messages will be sent to the application transport . If a different option is specified for the message it will be sent only to it .