[
https://issues.apache.org/jira/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175163#comment-14175163
]
ASF GitHub Bot commented on CAMEL-1077:
---------------------------------------
GitHub user yuruki opened a pull request:
https://github.com/apache/camel/pull/303
CAMEL-1077 Added remote address support to camel-netty consumer
This pull request adds *clientMode* parameter to netty component. When
*clientMode* is true netty consumer will listen to the given address as a
client.
Bear in mind that my experience with netty is about two days and the
approach used here might be completely wrong. My local unit tests seem to work
but there are no tests for clientMode in this pull request yet.
If the implementation proves solid we might want to switch the clientMode
on automatically for non-local addresses
(http://stackoverflow.com/questions/2406341/how-to-check-if-an-ip-address-is-the-local-host-on-a-multi-homed-system).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yuruki/camel netty-client-consumer
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/303.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #303
----
commit 0e07c5d337b4c73d34022be244fa526c8b84974d
Author: Jyrki Ruuskanen <[email protected]>
Date: 2014-10-17T14:45:18Z
Added remote address support to camel-netty consumer
----
> 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
>
> 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)