camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: How to receive async Messages on a MINA client ?
Date Thu, 19 Jun 2008 05:07:47 GMT

Ah you want from Camel to listen to a remote TCP server and poll data async?
Yes it seems as this is not possible out-of-the-box.

Camel can only produce to remote servers, eg. sending data from Camel to a remote server.

Please add a JIRA for this feature request.

> from("mina:tcp://remoteServer:port?codec=...").
Currently this is a MinaConsumer that is to be used for in Camel to act as a TCP server for
remote clients. You actually want the reverse ;). 

We need a clever way to specificy that is in the URI configuration as well.
To distingiush between:
- act as a local TCP server accepting remote clients
- act as client polling from a remote server

As a workaround you could probably do
1) Use the timer or other scheduler to start an event
2) use the mina producer to send empty data to the remote server and listen for reply (sync=true)


However this will send and wait for a reploy on the remote server.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: xjn [] 
Sent: 15. juni 2008 10:18
Subject: How to receive async Messages on a MINA client ?


i want to solve the following scenario (for a given server protocol) with
Camel and MINA :

* a client should connect to a server WITHOUT sending any data to the server
* this client should then only asynchronously read data from the server
converting it to messages (using a codec) 

I expected the following route to work :


But i will get only an exception

Caused by: Cannot assign requested address: bind

The reason might be, that from("mina:") seems to always use an IoAcceptor
and this is, of course, not possible on a remote address. On MINA an
IoConnector has to be used with async receive.

So how can i setup this requirement (without writing my own endpoint ) ?

Thx for help

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message