Hi
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)
from("timer://foo?period=5000").to("mina:tcp://remoteserver:port?codec=textline&sync=true")
However this will send and wait for a reploy on the remote server.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: xjn [mailto:[EMAIL PROTECTED]
Sent: 15. juni 2008 10:18
To: [email protected]
Subject: How to receive async Messages on a MINA client ?
Hi,
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 :
from("mina:tcp://remoteServer:port?codec=...").to("log:test?level=INFO")
But i will get only an exception
Caused by: java.net.BindException: 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:
http://www.nabble.com/How-to-receive-async-Messages-on-a-MINA-client---tp17847383s22882p17847383.html
Sent from the Camel - Users mailing list archive at Nabble.com.