Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 953 Bytes

File metadata and controls

31 lines (25 loc) · 953 Bytes
description
Splitter PHP

Splitter

The Splitter is endpoint where message can be splitted in several parts and be sent to be processed indepedently.

class Shop
{
    #[Splitter(inputChannelName="buyProduct", outputChannelName="buySingleProduct")]
    public function sendMultipleOrders(array $products) : array
    {
        return $products;
    }

    #[ServiceActivator("buySingleProduct")] 
    public function buyProduct(string $productName) : void
    {
        echo "Product {$productName} 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