You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Jeff Vienneau (JIRA)" <ji...@apache.org> on 2008/11/11 20:26:05 UTC

[jira] Created: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

tcp client mode / server mode determined by "to" or "from" elements limits usability.
-------------------------------------------------------------------------------------

                 Key: CAMEL-1077
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-mina
    Affects Versions: 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Barry Kaplan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54829#action_54829 ] 

Barry Kaplan commented on CAMEL-1077:
-------------------------------------

Actually, I implemented this yesterday just after I posted the comment. It was really quite simple. Here's what I did:

- created an interface MinaService 
- from MinaConsumer extracted MinaAcceptor extends MinaService, leaving an instance of MinaService
- from MinaProducer extracted MinaConnector extends MinaService, leaving an instance of MinaService
- Added the 'service={acceptor|connector}' property to MinaConfiguration along with a factory method to create a concrete MinaService (used by MinaConsumer/Producer).

All tests are green, but I have not yet added tests for the case where consumer is the connector and visa versa. But this is how my application works (as well as many FIX engines) and I am doing some smoke testing. The problem I am hitting is how to formulate a route in which the the producer/acceptor binds. (I'll probably figure it out, but any advice would be appreciated.)

Since I need a Ping in my application I will setup a route on the producer side like: from("mina:...&service=acceptor").to("direct:ping). 

But really a more general solution is needed. If I can get to this work I'll add tests within camel-mina and submit a patch.

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48192#action_48192 ] 

Claus Ibsen commented on CAMEL-1077:
------------------------------------

James what is the difference between
{code}
from("mina-server:localhost").bean(Somethings.class);
{code}

And what we have now in camel-mina?
{code}
from("mina:tcp:localhost").bean(Somethings.class);
{code}

I.e. reading this user guide from Mina
http://mina.apache.org/quick-start-guide.html

Shows how to setup Mina as a TCP server and this is excatly what we do in camel-mina today in the MinaConsumer.



> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Jeff Vienneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47271#action_47271 ] 

Jeff Vienneau commented on CAMEL-1077:
--------------------------------------

It seems to me producer / consumer is a concept for message flow, whereas client mode / server mode is a TCP connection specific concept that only really comes into play for connection establishment.

A server mode socket can consume or produce messages, but will listen for a client.

A client mode socket will also consume or produce messages, but will connect to a server at startup or through some lazy establishment policy.

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Jeff Vienneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48081#action_48081 ] 

Jeff Vienneau commented on CAMEL-1077:
--------------------------------------

Thanks for following up on this James!

Does that mean the mina-server would act a a client if defined in a "from" mapping? Which is the opposite of the current mina component.

It seems to me that there is are two phases to the component usage: 

*1) connection establishment*
--- server mode (uses mina acceptor) / client mode (uses mina connector)

*2) message handling*
--- async mode / syncronous mode (processes outbound message as an exchange)

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54818#action_54818 ] 

Claus Ibsen commented on CAMEL-1077:
------------------------------------

Barry, no its not on the roadmap in the near future.

As always we love contributions so please feel free to give it a go and try implement this feature.

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60518#action_60518 ] 

Claus Ibsen commented on CAMEL-1077:
------------------------------------

I think we should address this for the new camel-netty component.

Netty is clearly taking over mina as the better asynchronous communication framework.


> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Jeff Vienneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48087#action_48087 ] 

Jeff Vienneau commented on CAMEL-1077:
--------------------------------------

Sounds like we're on the same page. I like it.

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47285#action_47285 ] 

Claus Ibsen commented on CAMEL-1077:
------------------------------------

Jeff excatly. Maybe we could improve the wiki documentation for the camel-mina component
http://activemq.apache.org/camel/mina.html

Do you have any suggestions? 

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Jeff Vienneau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48081#action_48081 ] 

jeff_v edited comment on CAMEL-1077 at 12/11/08 4:25 AM:
----------------------------------------------------------------

Thanks for following up on this James!

Does that mean the mina-server would act a a client if defined in a "from" mapping? Which is the opposite of the current mina component.

It seems to me that there is are two phases to the component usage: 

*1) connection establishment*
--- server mode (uses mina acceptor) / client mode (uses mina connector)

*2) message handling*
--- async mode / syncronous mode (processes outbound message as an exchange)

The behavior in the two phases should be independently configurable and not bound together as they are today.

      was (Author: jeff_v):
    Thanks for following up on this James!

Does that mean the mina-server would act a a client if defined in a "from" mapping? Which is the opposite of the current mina component.

It seems to me that there is are two phases to the component usage: 

*1) connection establishment*
--- server mode (uses mina acceptor) / client mode (uses mina connector)

*2) message handling*
--- async mode / syncronous mode (processes outbound message as an exchange)
  
> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48084#action_48084 ] 

James Strachan commented on CAMEL-1077:
---------------------------------------

Yeah - I think the client and server endpoints would act similar; you could route from them or to them. Whether there are 4 (including async + sync) or whether sync/async mode is an extension or configuration of the endpoint is maybe separate.

The main difference is the server endpoint would use the different connection establishment.

Having

{code}
from("mina-server:localhost").bean(Somethings.class);
{code}

could then create a custom mina server with routing logic inside it. If folks send to "mina:server:localhost" then it could use the connection details of the server endpoint to know how to basically create a normal mina client producer to talk to the server's socket etc

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48076#action_48076 ] 

James Strachan commented on CAMEL-1077:
---------------------------------------

Maybe the "mina:" endpoint is a mina client - connecting to a remote socket and sending/receiving messages. Then we have a separate "mina-server" endpoint which does the reverse - for TCP based transports it opens a server socket etc?

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Barry Kaplan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54807#action_54807 ] 

Barry Kaplan commented on CAMEL-1077:
-------------------------------------

Are there any plans to pursue this? I'm in the process of of unwinding my use of came-mina since I need my mina-server(acceptor) to the message-producer and my mina-client(connector) to the be message-receiver.

> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1077) tcp client mode / server mode determined by "to" or "from" elements limits usability.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47256#action_47256 ] 

Claus Ibsen commented on CAMEL-1077:
------------------------------------

An org.apache.camel.Endpoint has methods to create either a:
- consumer
- producer
See the javadoc: http://activemq.apache.org/camel/maven/camel-core/apidocs/index.html

So you should be able to create the type you need.

However most people use the fluent route builder (Java DSL or Spring DSL) to construct routes where the type is explicit given as you type.

from(xx) = consumer
to(yy) = producer

So the URI is neutral and you can then create either a consumer or producer depending what you need.


> tcp client mode / server mode determined by "to" or "from" elements limits usability.
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1077
>             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
>            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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.