// this is ugly and slow!
// we have to go ChannelBuffer -> HornetQBuffer -> StompFrame -> String -> WebSocketFrame
// since HornetQ protocol SPI requires to return HornetQBuffer to the transport
HornetQBuffer buffer = new ChannelBufferWrapper((ChannelBuffer)msg);
StompDecoder decoder = new StompDecoder();
StompFrame frame = decoder.decode(buffer);