camel-users mailing list archives

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


See this thread for background:

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:

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

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).

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?

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:
Sent from the Camel - Users mailing list archive at

View raw message