Hello guys,
I just switched http component for all my routes to http4 component, we did
some performance testing and it really looks better. (Btw, anyone
interested in the results? Measured with JMeter, simple route, just
fetching xml file...).

The switch is kind of a hack, I did it via EventNotifierSupport
and CamelContextStartedEvent.
When camel context is started, I remove "http" component from registry and
put under that key "http4" component.
Why I did so is because now I don't have to change my configuration files,
where I have many http endpoints specified, used in DSL, resolved from
config with "simple" properties markup. So I'd have to rewrite the config
values with "http4" prefix.
Btw, how much bad idea is this solution? I'm not sure if I like it but it
works...

About my main problem now, preemtive auth is not supported in http4
component, right?
See (Camel 2.11.0) :

org.apache.camel.ResolveEndpointFailedException: Failed to resolve
endpoint:
http://10.32.232.61:8080/api/json?authMethod=Basic&authPassword=bar&authUsername=foo&httpClient.authenticationPreemptive=truedue
to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{authenticationPreemptive=true}]

I see that it's possible with HttpClient 4.x:
http://stackoverflow.com/questions/2014700/preemptive-basic-authentication-with-apache-httpclient-4

I need preemtive auth for integration with Jenkins through its "JSON/RPC"
API...
https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients

For now I'll try to solve it, following this thread:
http://camel.465427.n5.nabble.com/Camel-HTTP4-not-able-to-use-httpContext-endpoint-option-td5735937.html

But I don't like to know your opinion and how it should work in http4
component.

Thanks guys!

-- 
S pozdravem / Best regards
Martin Stiborský

Jabber: st...@njs.netlab.cz
Twitter: http://www.twitter.com/stibi

Reply via email to