Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Dynamic Endpoint URI - jetty producer's too many threads - Request parameter as part of the URL

$
0
0
We have some external service - the requests to this service are sent from
our camel route with jetty client (producer).
The url of this service is the following -
http://host/some/service/methodname/id
id is dynamic - it is some parameter, that is different in each request.

.to("endpoint_uri") operator doesn't allow (parse) dynamic parts of the url
(for example, id as header value).
To overcome this issue we used recipientList as described here -
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

Now we have a problem - recipientList thinks (is it so?), that each request
is a new endpoint and creates the new JettyClient ThreadPool with 8 threads
- and this happens by each request (because id is always different).

How can we solve this problem?
What is the right way in camel to send request to http service, which has
parameters as parts of the url?

Viewing all articles
Browse latest Browse all 5648

Trending Articles