That would be really helpful Sent from Mail for Windows 10
From: Jean-Baptiste Onofré Sent: 18 October 2019 13:19 To: [email protected] Subject: Re: batch http requests Let me check if I have something close to what you want to do. Regards JB On 18/10/2019 09:24, arshad dar wrote: > thank you for the reply. can you please provide a small example with > aggregators ? > > On Fri, Oct 18, 2019 at 12:06 PM Jean-Baptiste Onofré <[email protected]> > wrote: > >> Hi, >> >> you can use a aggregator to gather multiple reads and do a single HTTP >> request. >> Another option is to use a Processor. >> >> Regards >> JB >> >> On 18/10/2019 08:27, arshad dar wrote: >>> in the routes below i am reading from file and sending http requests, one >>> record for each http requests. what i want to do send multiple records in >>> http request as an array. >>> can any one help! thanks. >>> >>> >>> from(fileURI) >>> >>> .to(dataformatURL) >>> >>> .split(body()) >>> >>> .streaming() >>> >>> .parallelProcessing() >>> >>> .marshal().json(JsonLibrary.Jackson) >>> >>> .to("direct:api"); >>> >>> >>> >>> >>> >>> >>> >>> from("direct:api") >>> >>> .streamCaching() >>> >>> .onException(Exception.class) >>> >>> .handled(true) >>> >>> .to(errorFormat) >>> >>> .end() >>> >>> .loadBalance() >>> >>> .failover(maxAttempts, false, true) >>> >>> .to(hostsArray) >>> >>> end() >>> >> >> -- >> Jean-Baptiste Onofré >> [email protected] >> http://blog.nanthrax.net >> Talend - http://www.talend.com >> > > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
