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 identifierinputChannnelName- Required option, defines to which channel endpoint should be connectedoutputChannelName- Channel where result of method invocation will berequiredInterceptorNames- List of interceptor names, which should intercept the endpoint
Last updated
Was this helpful?