Internal Message Handler

Service Activator PHP

The Internal Handler connecting any service available in Depedency Container to an input channel so that it may play the role of a Endpoint. If the service produces output, it may also be connected to an output channel.

How to register

class Shop
{
    #[InternalHandler("buyProduct")] 
    public function buyProduct(int $productId) : void
    {
        echo "Product with id {$productId} was bought";
    }
}

Possible options

  • endpointId - Endpoint identifier

  • inputChannnelName - Required option, defines to which channel endpoint should be connected

  • outputChannelName - Channel where result of method invocation will be

  • requiredInterceptorNames - List of interceptor names, which should intercept the endpoint

Last updated