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é
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to