Hi Amitha, > One-to-many mapping from one in-sequence to many back-end APIs > > To me, this sounds like a dynamic endpoint[1]. You can achieve this via > in-sequence. > You can use default endpoint, which will send the request to the endpoint > in "To" header. You can create "To" header during the mediation. Following > is a example scenario. > > > Can the to header used to call multiple back-ends simultaneously? > > Say I have multiple back-ends. Once a user sends a request, API Manager > calls the said back-ends simultaneously (sequentially or in parallel - > requirement is to send call multiple back-ends in a single request) and > collect responses from each back-end and compose a response to be sent. > > Example: > > A hotel chain has multiple back-ends running for multiple purposes. If a > web UI requests details of a destination, say the request is sent to, 1. a > back-end for analytics purposes - no response is received, 2. receive > weather data of the location 3. booking back-end. > > Response: Booking related information of the destination including the > weather data in a single response. Say the response is prepared at the > out-sequence. > > How can such a scenario be handled? > You can use Aggregate mediator for this purpose. You can refer the docuementation for aggregrate mediatror[1] and sample scenario[2]which I have mentioned the links below.
[1] https://docs.wso2.com/display/EI600/Aggregate+Mediator [2] https://docs.wso2.com/display/EI600/Sample+62%3A+Routing+a+ Message+to+a+Dynamic+List+of+Recipients+and+Aggregating+Responses -- Dinusha Dissanayake Software Engineer WSO2 Inc Mobile: +94712939439 <https://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
