camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davsclaus <cib_re...@yahoo.dk>
Subject camel-mina TCP InOut exchange
Date Sun, 17 Feb 2008 16:48:59 GMT

Hi

See this thread for background:
http://www.nabble.com/Camel-TCP-receiver-endpoint-td15430834s22882.html

We think there is a bug/design issue with the came-mina component regarding
InOut patterns (request in  and response out from the TCP)

I will create a JIRA issue with a small testcase that fails this pattern. I
will also attach a patch that fixes this by adding a new parameter to the
build so you can specify that it should be in InOut pattern mode.

However if this is already possible using somekind of different
configuration of Camel I would like to know. I have scattered all the docs
on the wiki but the docs are quite sparse. Would be great with more examples
for the components. Also the concept of supporting the InOut pattern in the
fluent builder is a bit wage reading the docs.

However to start this discussion I fire a few questions:

1)
Why is the default exchange pattern in MinaEndpoint.createExchange(session,
object) = InOnly. The method getExchangePattern from super is InOnly?. 

2)
The MinaConsumer does not handle Out pattern and thus not writing response
back to the TCP client.
The problem was found in the background thread (see start).

3)
Which protocols TCP/UDP/VM should support InOnly or InOut? In my patch I
have only enabled InOut for the TCP protocol. Does it make sence for some of
the other protocols?

4)
I think the unit test MinaTcpWithInOutTest would be far from real life code.
Having inline processors where you set the received message to some class
attributes (receivedExchange = e). It was actually this unit test that good
me on the wrong path for solving the InOut problem. It starts its own Mina
Server etc.  Camel can start this out-of-the-box just using the fluent
builder, so starting your own Mina Server is not always needed.


I will post later with the JIRA ticket.
-- 
View this message in context: http://www.nabble.com/camel-mina-TCP-InOut-exchange-tp15530602s22882p15530602.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message