WSO2 ESB DBLookup mediator query multiple rows

mediator, wso2, wso2-esb

Solution

Yes DBlookup mediator will not return multiple rows. You can use two alternatives.

1) Use WSO2 Data services Server to create a data service and invoke that service from ESB using call out mediator.

2) You can write a class mediator to query data from database and then create a the payload from that and then send that through the sequence.

Problem

As it says in the documentation of the DBLookup Mediator it only returns the first row of the query, the other results if they are, were ignored. I want to know if there is a "best way" to run a query (SELECT * FROM X) that return multiple records and then process them. Now a days we are doing that implementing axis2 services but there is another way using a combination of the mediators provided by wso2 esb to accomplished that requirement?? Thanks in advance. Santiago.

Original source