简体   繁体   中英

JMS and HornetQ

JMS is the java messaging "API", still not clear for me what the third party API like HornetQ really does? isn't there any default/reference implementation?

JMS is just a specification, you can choose any implementation you like:

  • HornetQ
  • ActiveMQ
  • RedHat MRG
  • IBM MQ
  • Oracle MQ ... etc, etc... etc

Each one will offer different features additionally to the specification.

For instance HornetQ offers confirmation acknowledgement (so you don't need to block on sends waiting for confirmation and can use advanced techniques for asynchronous operations like asynchronous servlets).

HornetQ also offers large messages.

and HornetQ offers a core API as well where you can go without JMS.

I know for instance that you can also use IBM's API if you don't want to use JMS.

So, in Summary Java Message Service - JMS is just a set of java interfaces and you have to choose the proper implementation.

I think you're mixing some concepts. As you said, JMS is an API (or a spec if you prefer). Simplified JMS defines a set of interfaces, which have to be impleted by some vendor. In your case you are using JBoss HornetQ. However there are other implementatiojn out there like Apache ActiveMQ and others. So you can exchange the implemenation if you like or your requirements change.

The Provider, which implements the JMS API, might include additional features. But those are proprietary and not in the JMS spec. So maybe replication is included in one provider, while another doesn't offer this kind of functionality.

Another example can be found in JDBC. JDBC itself is the API, but there exist different implementation for different databases. Same to JPA, where Hibernate and Toplink are prominent examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM