[
https://issues.apache.org/jira/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701131#comment-15701131
]
Dima edited comment on CAMEL-1077 at 11/29/16 12:31 AM:
--------------------------------------------------------
I have the same issue, Is it possible to configure "To" adapter in
server-socket mode. I need to set up one-way communication level.
"From" connects to a remote service as client socket and starts receiving text
stream, then I need to forward this stream into server socket. No
request-response logic just streaming
from("netty4:tcp://remote:54321?textline=true&sync=false&clientMode=true&reconnectInterval=1000")
.to("netty4:tcp://0.0.0.0:12345?transferExchange=true&textline=true&clientMode=false&sync=false")
For "From" instruction it works, but "To" instruction does not want to an open
server socket, it tries to connect localhost:12345 while I want to open the
server socket on port 12345
was (Author: tsigelnik):
I have the same issue, Is it possible to configure "To" adapter in
server-socket mode. I need to set up one-way communication level.
"From" connects to a remote service as client socket and starts receiving text
stream, then I need to forward this stream into server socket. No
request-response logic just streaming
from("netty4:tcp://remote:54321?textline=true&sync=false&clientMode=true&reconnectInterval=1000")
.to("netty4:tcp://localhost:12345?transferExchange=true&textline=true&clientMode=false&sync=false")
For "From" instruction it works, but "To" instruction does not want to an open
server socket, it tries to connect localhost:12345 while I want to open the
server socket on port 12345
> tcp client mode / server mode determined by "to" or "from" elements limits
> usability.
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-1077
> URL: https://issues.apache.org/jira/browse/CAMEL-1077
> Project: 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
> Reporter: Jeff Vienneau
> Assignee: Willem Jiang
> Fix For: 2.15.0
>
>
> Internally,
> MinaProducer is coded to create a Mina connector (client mode socket).
> MinaConsumer is coded to create a Mina acceptor (server mode socket).
> Additionally, it appears a producer (client mode socket) is created for a
> "to" route mapping and a consumer (server mode socket) is created for a
> "from" route mapping.
> This means an endpoint cannot be created in which the session is initiated by
> a client and messages are routed "to" the client.
> The opposite is also true, an endpoint with a "from" route mapping cannot
> establish a connection to a tcp server.
> This is a major limitation, as we do not often have control over the systems
> with which we are interfacing.
> Perhaps, the mina::tcp URI could have a parameter the sets the socket mode:
> tcp.mode=server or tcp.mode=client.
> Hope this make sense, thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)