After being distracted a lot with RESTEasy releases over the past few months, I finally have something usable (and more importantly, documented) for the HornetQ REST Interface I’ve been working on. The interface allows you to leverage the reliability and scalability features of HornetQ over a simple REST/HTTP interface. Messages are produced and consumed by sending and receiving simple HTTP messages containing the XML or JSON (really any media type) document you want to exchange.
Other than being buzzword compliant here are some of the reasons you might want to use the HornetQ REST Interface:
- Usable by any programming language that has an HTTP client library.
- Zero client footprint. We want HornetQ to be usable by any client/programming language that has an adequate HTTP client library. You shouldn’t have to download, install, and configure a special library to interact with HornetQ.
- No envelope (i.e. SOAP) or feed (i.e. Atom) format requirements. You shouldn’t have to learn, use, or parse a specific XML document format in order to send and receive messages through HornetQ’s REST interface.
- Lightweight interoperability. Since interactions are RESTful the HTTP uniform interface provides all the interoperability you need to communicate between different languages, platforms, and even messaging implementations that choose to implement the same RESTful interface as HornetQ (i.e. the REST-* effort.)
- Leverage the reliability, scalability, and clustering features of HornetQ on the back end without sacrificing the simplicity of a REST interface.
HornetQ REST Features
- Duplicate detection when producing messages
- Pull and Push consumers
- Acknowledgement and Auto-acknowledgement protocols
- Create new queues and topics
- Mix and match JMS and REST producers and consumers
- Simple transformations
Visit the HornetQ REST Interface web page to find links for downloading and browsing docs, source code, and examples.
Aug 13, 2010 @ 10:41:22
Hi Bill,
The REST api is very useful. I will be grateful if you can share some idea about how could we implement “Request-Response” pattern for a queue using the new REST api which allow us to achieve the same behavior as the existing HornetQ examples eg. Queue Requestor or Request-Reply. Assuming that I have a JMS MDB or custom consumer to processing the incoming client message.
Thanks.
Rgds,
Danny
Aug 13, 2010 @ 23:08:08
Right now I don’t have anything. Any request header that does not start with “Content-*” is filtered out, or otherwise I’d say you could just pass URLs around in a custom header. I need to fix this in the next release.
Also I would be happy to flush out your requirements and implement something you need. Ping me here, on hornetq dev list or resteasy dev list.
Aug 14, 2010 @ 05:26:00
Hi Bill,
Thank for reply. Normally, we treat the Queue as Messaging Endpoint for retrieving messages. Why can’t we treat the Queue as something like Web Service/RPC/Function End Point for synchronous request-reply operation which can run side by side with the original asynchronous nature of JMS.
In my project, I have chosen HornetQ for its 307% performance boost and its efficiency of managing large object transfer. I am implementing something like below:
Clients (REST/HTTP) HornetQ + [Request Handler]
Then, effectively, we can make HornetQ work like Apache Web Server PLUS all the benefits of HornetQ Messaging capability & scalability which allow synchronous and asychronous client communication using just REST api and also can optionally live inside JavaEE ecosystem for other Heavy Duty operation.
If I can obtain the full sources of the HornetQ REST Api, perhaps I can work out some experiment on it.
Thanks.
Feb 28, 2011 @ 11:20:49
Hi Bill,
Checking out the hornetQ REST API and I really like it.
One question: Can you add a message property, like
textMessage.setStringProperty("foo", "bar");
directly in the message headers ?
Help here would be great appreciated 🙂 (I am not that familiar with REST)
Paul
Mar 02, 2011 @ 23:54:26
Not at the moment, I’ll work on that feature, thanks.
Apr 18, 2012 @ 08:47:38
Hello,
can the HornetQ specific features like “Priority” (specify a message priority) and “Message Grouping” (specify a Message Group ID) be used when using the REST interface ?
Thank you in advance