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 17:14:05 UTC

[jira] Created: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.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.


[jira] Updated: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1075:
-------------------------------

    Fix Version/s: Future
       Issue Type: New Feature  (was: Improvement)

Requires Mina 2.0

> mina tcp: support for asyncronous InOut endpoint.
> -------------------------------------------------
>
>                 Key: CAMEL-1075
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1075
>             Project: Apache Camel
>          Issue Type: New Feature
>          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
>             Fix For: Future
>
>
> 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.


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

With CAMEL-2151 we have the pieces in camel-core for the foundation for async request/reply.

When we upgrade to Mina 2.0 (when its GA) then Mina itself should have some support for this as well AFAIR

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

> Re: #3 it would be useful if Camel could expose a listener and the send messages to the client once the connection is established.
See the route above with the Spring DSL (XML). What do you mean with *once the connection is established*? If you need more control of the listener you can use plain Apahca Mina that gives your plenty of options. 

Re: #4 it would be useful if Camel could connect to a server and receive messages from the server.
Such as this sample below where we send a request to the externalserver on TCP port 1234 with the text "Hello World" and waits for a response.
{code}
Object out = producerTemplate.requestBody("mina:tcp://externalserver:1234?sync=true&textline=true", "Hello World");
System.out.println(out);
{code}
And the out is the response from the server such as "Bye World"

See the mina documentation at:
http://activemq.apache.org/camel/mina.html

And then try for yourself, it's about time you started "asking the computer" and get some hands on experience. Camel is very fast for rapid prototyping.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

Jeff,

Yes all the routing can be done with Spring DSL (XML) eg:
{code:xml}
<route>
   <from uri="mina:tcp://localhost:1234?sync=false&textline=true"/>
   <to uri="log:logRequest"/>
</route>
{code}

This route above could be the TCP lister as example #3.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

Sorry Jeff. I got it now. 

This use-case that you state last isn't something I have stumbled into in my 10+ years in the field. Usually messaging is used for that kind of use-case.

Yeah we love contributions so if you crank up something usable please feel free to post it on the forum.
http://activemq.apache.org/camel/contributing.html


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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

Jeff I posted 4 scenarios above I will re-edit to make them stand out.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Jeff Vienneau commented on CAMEL-1075:
--------------------------------------

Thanks Claus,

Can I do that in XML to route messages?

None the less, my needs are to be able to open a tcp socket and have two way async message flow over that same socket. I suggest others would be interested in this as well.

Re: #3 it would be useful if Camel could expose a listener and the send messages to the client once the connection is established.

Re: #4 it would be useful if Camel could connect to a server and receive messages from the server.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

Hi Jeff

I still don't get what you think is needed.

aysync InOut, how is that possible? Isn't it contradictorily (opposite of each other). 

*InOut* (option sync=true)
Camel support both client and server

Server: Camel exposes a TCP listener. This listener will wait for requests and send a reply to the caller (in out)
Client: Camel calls an external TCP server and sends a request and waits for a reply (in out)



*InOnly* (option sync=false)
Camel support both client and server

Server: Camel exposes a TCP listener. This listener will wait for requests and *not* send a reply to the caller (in only). Note: The client is supposed to not wait for a reply.
Client: Camel calls an external TCP server and sends a request and do *not* waits for a reply (in only)

This can be used for instance as a TCP logger server, where clients can send logs to the TCP server.


What am I missing in the picture?

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

camel-netty producer is now fully non blocking async

> mina tcp: support for asyncronous InOut endpoint.
> -------------------------------------------------
>
>                 Key: CAMEL-1075
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1075
>             Project: Apache Camel
>          Issue Type: New Feature
>          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
>             Fix For: Future
>
>
> 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.


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Jeff Vienneau commented on CAMEL-1075:
--------------------------------------

h4. In the case of:  tcp,mode=server;sync=false:
h5. Not Connected
Listener is waiting for connections
Outbound - messages are discarded.
Inbound - messages do not occur. (camel is waiting for producer to produce message)

h5. Connected
Outbound - messages are send over socket
Inbound - data coming from client is converted to messages and sent through producer to camel

h4. In the case of:  tcp.mode=server;sync=false:
A connection is made to client at startup when consumer is created.
Outbound - messages are sent over socket
Inbound - data coming from remote server is converted to messages and sent through producer to camel

Further to the logging example above, what if you want to *be the client* posting logs to another system?



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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

Yannick, thanks for reporting your experience and the layout of your solution.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

> Further to the logging example above, what if you want to be the client posting logs to another system?
This is excatly what #4 does.

{code}
producerTemplate.sendBody("mina:tcp://externalserver:1234?sync=false&textline=true", "Hello World");
{code}

In the code above we send the text "Hello World" from Camel (where we is a client) to an external system (the externalserver) using TCP on port 1234. We use sync=false as we as the client do not want to wait for a response from the external server.

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


[jira] Issue Comment Edited: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

davsclaus edited comment on CAMEL-1075 at 11/12/08 9:45 AM:
--------------------------------------------------------------

Hi Jeff

I still don't get what you think is needed.

aysync InOut, how is that possible? Isn't it contradictorily (opposite of each other). 

*InOut* (option sync=true)
Camel support both client and server

#1
Server: Camel exposes a TCP listener. This listener will wait for requests and send a reply to the caller (in out)

#2
Client: Camel calls an external TCP server and sends a request and waits for a reply (in out)


*InOnly* (option sync=false)
Camel support both client and server

#3
Server: Camel exposes a TCP listener. This listener will wait for requests and *not* send a reply to the caller (in only). Note: The client is supposed to not wait for a reply.

#4
Client: Camel calls an external TCP server and sends a request and do *not* waits for a reply (in only)

This can be used for instance as a TCP logger server, where clients can send logs to the TCP server.

What am I missing in the picture?

      was (Author: davsclaus):
    Hi Jeff

I still don't get what you think is needed.

aysync InOut, how is that possible? Isn't it contradictorily (opposite of each other). 

*InOut* (option sync=true)
Camel support both client and server

Server: Camel exposes a TCP listener. This listener will wait for requests and send a reply to the caller (in out)
Client: Camel calls an external TCP server and sends a request and waits for a reply (in out)



*InOnly* (option sync=false)
Camel support both client and server

Server: Camel exposes a TCP listener. This listener will wait for requests and *not* send a reply to the caller (in only). Note: The client is supposed to not wait for a reply.
Client: Camel calls an external TCP server and sends a request and do *not* waits for a reply (in only)

This can be used for instance as a TCP logger server, where clients can send logs to the TCP server.


What am I missing in the picture?
  
> 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.


[jira] Issue Comment Edited: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

jeff_v edited comment on CAMEL-1075 at 11/12/08 8:22 AM:
----------------------------------------------------------------

h4. In the case of:  tcp,mode=server;sync=false:
h5. Not Connected
Listener is waiting for connections
Outbound - messages are discarded.
Inbound - messages do not occur. (camel is waiting for producer to produce message)

h5. Connected
Outbound - messages are send over socket
Inbound - data coming from client is converted to messages and sent through producer to camel

h4. In the case of:  tcp.mode=client;sync=false:
A connection is made to client at startup when consumer is created. (Also, it would need to be re-established if connection is lost.)
Outbound - messages are sent over socket
Inbound - data coming from remote server is converted to messages and sent through producer to camel

Further to the logging example above, what if you want to *be the client* posting logs to another system?



      was (Author: jeff_v):
    h4. In the case of:  tcp,mode=server;sync=false:
h5. Not Connected
Listener is waiting for connections
Outbound - messages are discarded.
Inbound - messages do not occur. (camel is waiting for producer to produce message)

h5. Connected
Outbound - messages are send over socket
Inbound - data coming from client is converted to messages and sent through producer to camel

h4. In the case of:  tcp.mode=server;sync=false:
A connection is made to client at startup when consumer is created.
Outbound - messages are sent over socket
Inbound - data coming from remote server is converted to messages and sent through producer to camel

Further to the logging example above, what if you want to *be the client* posting logs to another system?


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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Jeff Vienneau commented on CAMEL-1075:
--------------------------------------

Re: #4, We're talking: "connect to a server and receive massages", not connect to a server and send "Hello World" and wait for a response, that's *syncronous*. 

I'm talking *asyncronous*. Connect to a server, leave the connection open and if it sends a message, route the message, otherwise keep the socket alive and keep waiting.

We know the system can do InOut syncronous. but what I am talking about is: *Two way* message routing of *asyncronous* messages irrespective of the means to establish the connection.

With all due respect, I have been prototyping and reading the code. You are misinterpreting me.

I am trying to point out a need that I have with the system that is lacking for the greater good of Camel Mina. I will be solving my problem with a hand cobbled component, but I just wanted to point out the issue. If I end up with something of quality I will post it in the forum.

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


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

Posted by "Yannick Lecaillez (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (CAMEL-1075) mina tcp: support for asyncronous InOut endpoint.

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

Claus Ibsen commented on CAMEL-1075:
------------------------------------

[18:14]  <jgenender> cibsen: Hehe... you need to get creative on that ;-)
[18:15]  <jgenender> cibsen: I used Hashmaps with message ID s
[18:15]  <jgenender> cibsen: Many ways to do it
[18:15]  <cibsen> and the message ids then have to part of the data send over the wire?
[18:15]  <jgenender> cibsen: You can do it via session id
[18:15]  <cibsen> what if I use some old custom text based protocol which does not offer a field for that
[18:16]  <jgenender> The socket session is unique
[18:16]  <cibsen> ah cool that is what I liked to hear
[18:16]  <cibsen> yeah then a map is sufficient
[18:16]  <jgenender> So create a Hashmap that correlates teh session id (the socket) to information on the client and you have what you need
[18:16]  <jgenender> You can even create state and store it in the hashmap
[18:16]  <cibsen> :) like it already

> mina tcp: support for asyncronous InOut endpoint.
> -------------------------------------------------
>
>                 Key: CAMEL-1075
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1075
>             Project: Apache Camel
>          Issue Type: New Feature
>          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
>             Fix For: Future
>
>
> 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.