[
https://issues.apache.org/activemq/browse/CAMEL-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48313#action_48313
]
Yannick Lecaillez commented on CAMEL-1075:
------------------------------------------
I'm really new to camel so my point is perhaps totally wrong but ...
In fact, i had excatly the same problem. I have a custom server which bind to a
socket and wait for some client to connect. Once connected, server and client
can exchange messages but not in a request/reply way. Each end could send
message to the other end from its own authority.
When i discovered the (great) camel, i firstly thought i would be able to
re-implement my custom server (based on mina) completly using apache camel and
i fall in the same "trap" than you. From what i understood of camel your
problem isn't solvable in that way. I mean you cannot use the mina component in
that way. And as you said, you have to implement a custom component.
So i wrote my own "customserver" component (so easily, thanks to camel great
API). Rather than doing from("mina:tcp//...") (which cause the problem of the
communication from server -> client in a non request/reply scenario) i'm
currently doing a from("customserver://serverName") and a
to("customserver://serverName"). My server is registered into the camel
registry using spring and is known as "serverName".
Then from the consumer part of my component i fetch the server instance (using
uri and registry) and add a listener to it (my consumer component is then
listening for incoming message from my custom server. In fact, client
messages). On the producer part i'm listening for incoming message from camel.
When message arrives i simply forward them to the "myServer" instance.
The problem of mapping message to client is done by an internal clientID which
is set on the header of each messages.
I don't had time yet to test my implementation, but it should work.
Hope that helps you.
> mina tcp: support for asyncronous InOut endpoint.
> -------------------------------------------------
>
> Key: CAMEL-1075
> URL: https://issues.apache.org/activemq/browse/CAMEL-1075
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-mina
> Affects Versions: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0
> Environment: All.
> Reporter: Jeff Vienneau
>
> Mina Component does not support async InOut connections.
> Many applications require two way or out only async tcp connections this is
> not supported.
> See a more full discussion on this here:
> http://www.nabble.com/Can-mina::tcp-do-asyncronous-bidirectional-messages--tc20431804s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.