public function route(string $messageClass): array
    {
        if (false === empty($this->routes[$messageClass]))
        {
            return $this->routes[$messageClass];
        }

        return $this->globalEndpoints;
    }
public function route(string $messageClass): array
    {
        if (false === empty($this->routes[$messageClass]))
        {
            return $this->routes[$messageClass];
        }

        return $this->globalEndpoints;
    }
public function route ( string $ messageClass ) : array { if ( false === empty ( $ this -> routes [ $ messageClass ] ) ) { return $ this -> routes [ $ messageClass ] ; } return $ this -> globalEndpoints ; }
Receiving a message sending route
If no specific route is registered, the default endpoint route will be returned.

@psalm-return array<array-key, \ServiceBus\Endpoint\Endpoint>

@param string $messageClass

@return \ServiceBus\Endpoint\Endpoint[]
Receiving a message sending route If no specific route is registered the default endpoint route will be returned .