camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <r...@evosent.com>
Subject Re: Camel HTTP component vs. Apache HTTP client
Date Sun, 21 Jul 2013 11:15:25 GMT
Hi,

Can you also post your other version with the Apache HTTP client only?

I'd like to compare them to know where the performance hit is coming from.

Thanks,
Raúl.
On 21 Jul 2013 06:10, "humayun0156" <humayun0156@gmail.com> wrote:

> from("direct:npGet")
>                 .setHeader(Exchange.HTTP_METHOD, constant("GET"))
>                 .setProperty("url", simple("${body}"))
>                 .recipientList(simple("${body}?" + npAuthenticationString))
>                 .convertBodyTo(Document.class)
>                 .bean(HelperBean.class, "setUrlETagMapping")
>                 .process(new ObjectCreationProcess(xmlToObjectMapping));
>
>
>
> stopWatch.start();
> Exchange ex = producerTemplate.request("direct:npGet", new
> StringBodyProcessor(resourceURI.toString()));
> stopWatch.stop();
>
>
> The StringBodyProcessor is simply to set the url in the exchange body.
> The ObjectCreationgProcess is simply to create a new Object of the
> downloaded xml.
>
> My producer template is in a recursive loop.
>
> and my resourceURI is looks like : http://mysite.com/users/{id}
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-HTTP-component-vs-Apache-HTTP-client-tp5735943p5735954.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message