I just have quick search and found DelimiterBasedFrameDecoder[1] can
meet you need.
You have to find a way to put into camel-netty :)
[1]http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/codec/frame/DelimiterBasedFrameDecoder.html
On Thu May 17 04:18:56 2012, jburford wrote:
Hello.
I have had success using Camel to be the router/glue between disparate
communication protocols& software without having much/any dependency on
Camel in my code. I was hoping I could do this once more to create a
consumer of an existing piece of code which sends 100 byte raw messages
(with a 2 byte delimiter) via TCP. I have looked at Netty and Mina and it
appears if the content was text and my delimiter was a newline I could then
just use Mina with textline true.
I'm hoping someone can suggest the simplest way to do this for messages
which are delimited by 2 specific bytes. Almost like a byte stream decoder
which takes a maximum message length and N delimiter bytes. If no such
thing exists (or workaround/compromise), perhaps I can write one and
contribute it if anyone considers it useful.
Thanks!
Jon
--
View this message in context:
http://camel.465427.n5.nabble.com/receiving-raw-byte-messages-over-TCP-tp5711101.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang