camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Kaiser <alexander.g.kai...@gmail.com>
Subject Re: Single request with multiple replies over TCP
Date Wed, 20 Jun 2012 20:21:59 GMT
Hi Claus,

thanks for your reply! The protocol is indeed line based. I actually tried
to write my own codec, but without success, the decode method always was
called two times, and only the result of the first call ended up in the
message body. That's why I was asking for mina2 docu.

Anyway, I ended up writing my own component, which also gives me a very
nice concise URI, so I am happy with that. But of course now I had to
implement some low level socket communication which I had wanted to avoid
initially.

Alexander

2012/6/19 Claus Ibsen <claus.ibsen@gmail.com>

> On Mon, Jun 18, 2012 at 3:05 PM, Alexander Kaiser
> <alexander.g.kaiser@gmail.com> wrote:
> > Hi,
> >
> > I am trying to connect to a server with mina. The server sends a hello
> > message on socket connect, then I send it a command and want to receive
> the
> > servers reply in the message body.
> >
> > camel-mina connects server
> >                  <-- welcome message
> > command -->
> >                  <-- reply
> >
> > Basically I need to skip, or parse and skip the welcome message, and then
> > decode the reply.
> >
> > With mina I can get only the servers welcome message. I read in a
> > thread<
> http://camel.465427.n5.nabble.com/Single-request-with-multiple-replies-over-TCP-td5022206.html
> >on
> > this subject that mina2 supports this kind of scenario, but I can't
> > find
> > any documentation on mina2.
> >
> > Does mina2 indeed support this?
> >
> > Many thanks,
> > Alexander
>
> What protocol are you using?
> A text based, with a line terminator or something?
>
> You could possible build a custom codec, that understands the welcome
> message, and is capable of skipping that.
>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Alexander

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message