The other thing I don't understand is why are you converting queues like queue/MyQueue to jmsqueues.MyQueue ?
According to the STOMP protocol:
"This sends a message to the /queue/a destination. This name, by the way, is arbitrary, and despite seeming to indicate that the destination is a "queue" it does not, in fact, specify any such thing. Destination names are simply strings which are mapped to some form of destination on the server - how the server translates these is left to the server implementation"
The name is just a string, so shouldn't need any conversion, just like our core address...
Yes, this code can be optimized.
I pasted the marshalling code from StompConnect and once the protocol is implemented, I'll optimize it.
For now, I have mimicked ActiveMQ server implementation: /queue/XXX are mapped to JMS queue, /topic to JMS topics, etc.
This makes it simpler for the time being to check the protocol.
However, you're right, nothing prevents to have a different mapping on HornetQ provided it is documented along the line of http://hornetq.sourceforge.net/docs/hornetq-2.0.0.GA/user-manual/en/html/jms-core-mapping.html.