You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Christian Schneider <ch...@die-schneider.net> on 2008/12/14 10:17:54 UTC

Idea: Correlation Interceptor

Hi,

I just proposed this in response to the cxf user thread cxf client 
restart but I think the idea should be discussed on the dev list also.

So what I propose is addíng a correlation interceptor that does two things:
- When sending out a message it stores the exchange and the correlation id.
- When receiving a message it finds the correlated exchange and connects 
the incoming message to the exchange

The interceptor could also create a correlation id if none is set but 
perhaps the correlation id creation should be separated from correlating 
the messsages. This should allow users to write an interceptor that 
manages persistence of messages. Recently we added continuation support 
to the transports perhaps this could also be done with such an 
interceptor. The aproach would then also allow to create an interceptor 
that simply does no correlation so you can receive all responses 
asynchronously. This is important if you want to create fault tolerant 
clients.

Any opinions on this?

Greetings

Christian

-- 

Christian Schneider
---
http://www.liquid-reality.de


Re: Idea: Correlation Interceptor

Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,

I saw some correlation id codes in the JMSConduit.
I am +1 if we can move them out into an pair of interceptors.

Willem

Christian Schneider wrote:
> Hi,
> 
> I just proposed this in response to the cxf user thread cxf client
> restart but I think the idea should be discussed on the dev list also.
> 
> So what I propose is addíng a correlation interceptor that does two things:
> - When sending out a message it stores the exchange and the correlation id.
> - When receiving a message it finds the correlated exchange and connects
> the incoming message to the exchange
> 
> The interceptor could also create a correlation id if none is set but
> perhaps the correlation id creation should be separated from correlating
> the messsages. This should allow users to write an interceptor that
> manages persistence of messages. Recently we added continuation support
> to the transports perhaps this could also be done with such an
> interceptor. The aproach would then also allow to create an interceptor
> that simply does no correlation so you can receive all responses
> asynchronously. This is important if you want to create fault tolerant
> clients.
> 
> Any opinions on this?
> 
> Greetings
> 
> Christian
>