-
1. Re: Using HornetQ for custom messaging protocol
jbertram Jun 27, 2012 11:51 PM (in response to vishnu_pillai)Why not configure an SSL Netty acceptor, and then just use the HornetQ "core" API to send messages and receive the responses via a org.hornetq.api.core.client.ClientRequestor. On the server-side the message processors can use filters to get the messages they want.
To be clear, the underlying HornetQ message is basically just a byte[] moving over the wire.
-
2. Re: Using HornetQ for custom messaging protocol
vishnu_pillai Jun 28, 2012 1:41 PM (in response to jbertram)Hi Justin,
Thanks for the quick reply.
We do not want to enforce usage of any specific API/framework on the client side in order to communicate with our server. Will that be possible using HornetQ core? If so, how do I configure a protocol handler into HornetQ so that the logic for reading a message from the socket is left to the application? The org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder class is close to what we need. Does the HornetQ wire protocol adhere to this decoding/encoding logic?
Thanks,
Vishy
-
3. Re: Using HornetQ for custom messaging protocol
jbertram Jun 29, 2012 11:23 AM (in response to vishnu_pillai)Since HornetQ is a message broker it takes care of reading the message off the wire and putting the message somewhere where the application can access it (e.g. a queue). I believe you can extend HornetQ to support your specific protocol (much like the way STOMP support was implemented), but I don't know if you can alter it so that it passes the socket all the way down to an application. IMO, that would be more work than it was worth and you would basically be throwing away most of what HornetQ was good for.
-
4. Re: Using HornetQ for custom messaging protocol
vishnu_pillai Jul 2, 2012 6:33 PM (in response to jbertram)Hi Justin,
Adding a custom protocol manager is supported to some extent in HornetQ, but that requires modification of a few core classes so it appears like end users cannot add support for new protocols. And I agree this might be in line with HornetQ's positioning as a message broker.
I've discarded the idea of using HornetQ for now and do something more simpler.
Thanks,
Vishy