You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Wicki <da...@gmail.com> on 2013/09/27 10:28:23 UTC

Read a stream from telnet service

Hi all!

I'm new to this mailing list - and new to camel;-)

What I'm trying to do is, connecting to a tcp port (which is a telnet 
service) and continuously read the character stream that is sent through 
the connection. The stream basically "never" ends. The stream of 
characters can be divided into separate messages. The separator is a 
keyword. So, the stream could look like:

...<separator>message 5<separator>message6<separator>message7<separ...

What camel component could I use to connect to the remote service? The 
component should read continuously and emit a message to the following 
components every time a separator is seen.

Any suggestions?

-David



Re: Read a stream from telnet service

Posted by David Wicki <da...@gmail.com>.
Thank you for your answer. I think I'm going to implement the logic 
myself and feed a JMS queue. From there on, I can use Camel...

  -David



On 09/30/2013 12:54 PM, Claus Ibsen wrote:
> This is not currently possible out of the box in any of the camel-mina
> or camel-netty components.
>
> You can of course use Mina or Netty API and write the logic yourself.
>
> There is some tickets in JIRA about having camel-mina supporting to
> connect to a remote server and read input as a stream.
>
>
>
> On Fri, Sep 27, 2013 at 10:28 AM, David Wicki <da...@gmail.com> wrote:
>> Hi all!
>>
>> I'm new to this mailing list - and new to camel;-)
>>
>> What I'm trying to do is, connecting to a tcp port (which is a telnet
>> service) and continuously read the character stream that is sent through the
>> connection. The stream basically "never" ends. The stream of characters can
>> be divided into separate messages. The separator is a keyword. So, the
>> stream could look like:
>>
>> ...<separator>message 5<separator>message6<separator>message7<separ...
>>
>> What camel component could I use to connect to the remote service? The
>> component should read continuously and emit a message to the following
>> components every time a separator is seen.
>>
>> Any suggestions?
>>
>> -David
>>
>>
>
>


Re: Read a stream from telnet service

Posted by Claus Ibsen <cl...@gmail.com>.
This is not currently possible out of the box in any of the camel-mina
or camel-netty components.

You can of course use Mina or Netty API and write the logic yourself.

There is some tickets in JIRA about having camel-mina supporting to
connect to a remote server and read input as a stream.



On Fri, Sep 27, 2013 at 10:28 AM, David Wicki <da...@gmail.com> wrote:
> Hi all!
>
> I'm new to this mailing list - and new to camel;-)
>
> What I'm trying to do is, connecting to a tcp port (which is a telnet
> service) and continuously read the character stream that is sent through the
> connection. The stream basically "never" ends. The stream of characters can
> be divided into separate messages. The separator is a keyword. So, the
> stream could look like:
>
> ...<separator>message 5<separator>message6<separator>message7<separ...
>
> What camel component could I use to connect to the remote service? The
> component should read continuously and emit a message to the following
> components every time a separator is seen.
>
> Any suggestions?
>
> -David
>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Read a stream from telnet service

Posted by Hilderich <hi...@yahoo.de>.
I have just read of someone with a similar problem and he got the advice to
use the netty component.

http://camel.apache.org/netty.html



--
View this message in context: http://camel.465427.n5.nabble.com/Read-a-stream-from-telnet-service-tp5740283p5740298.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Read a stream from telnet service

Posted by Hilderich <hi...@yahoo.de>.
Hello,

My first thought was about the exec: component e.g.

to("exec:telnet?args=192.168.0.1 80") or on linux
to("exec:cmd?args=/C 192.168.0.1 80")

But what about the inputs received by telnet? Maybe you should
take a closer look to all components:

http://camel.apache.org/components.html

Hilderich



--
View this message in context: http://camel.465427.n5.nabble.com/Read-a-stream-from-telnet-service-tp5740283p5740297.html
Sent from the Camel - Users mailing list archive at Nabble.com.