activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mindaugas JanuĊĦaitis" <>
Subject Improved NIO support, Stomp enabled with NIO
Date Fri, 13 Apr 2007 20:36:56 GMT
Hello developers,

This is my first post :)

So here goes the story... I have written in C Partial implementation of
Stomp Broker
and there was a need to interconnect it with apache-mq the performance was
the bottleneck.

When I took a quick look @ stable src, there was no clue of using Java NIO,
but in SVN I found
a stub or initial implementation, a few minutes I was Happy as long as I
replaced 'StompTransportFactory extends TcpTransportFactory'
with StompTransportFactory extends NIOTransportFactory' and  was rewarded
with Exception :)

Further Investigation showed that This NIO implementation makes assumptions
about it's user, and it looks like it assumes that the OpenWire Protocol
uses it.
by the way, I found that there is no Transport that uses the
NIOTransportFactory at the moment.

My implementation should be 'Drop in replacement' for TcpTransportFactory. I
took universal approach and implemented: NIOBufferedInputStream &&
NIOBufferedOutputStream.   Despite the fact that we still have Thread per
client (with nio we should use selectors and less threads, but it would
require full apache-mq rewrite :) )  the performance improvement is about
80%. Basically it fullfils my requirements. It would be nice to have this
patch included.

Any Comments && Questions are welcome...

The patch is attached.

View raw message