Hi,

is there some kind of holistic concept for HTTP session handling (for HTTP 
based producer endpoints) in Camel?

I managed to find basic HTTP session handling in the following camel component:

-          The  camel-http4 component allows injecting a 
org.apache.http.client.CookieStore to the endpoint

-          CXF allows to configure session handling on conduits. I would guess 
that this can somehow also be leveraged by camel-cxf producer endpoints

This means that the session handling can somehow be configured on CamelContext 
Route or Endpoint level (but only for these two component, not e.g. for 
camel-ahc and other HTTP based endpoints (I may have overlooked some)).

Let us now assume the following scenario: In a camel route you want to do some 
calls to a stateful service. You do a login call, then some calls that query 
and change data, and in the end you do a logout. With the current camel-http4 
capabilities it looks as if you could implement this on the first glance. 
However as the CookieStore is configured on the level of an endpoint (but 
multiple endpoints may share the same CookieStore), different parallel 
invocations of the route will share the same HTTP session (which will likely 
cause issues under load).

This behavior is different from e.g. the camel-jms or camel-jdbc components, 
which allow to configure transaction managers to have a shared database or JMS 
transaction. These transactions are bound to the Exchange.

Do you think it would make sense to start a conceptual discussion about HTTP 
sessions, or is this topic too remote to be interesting for the camel community?

Best regards
Stephan

Reply via email to