iii
1. Legal Notice ................................................................................................................ 1
2. Preface ......................................................................................................................... 3
3. Project Information ...................................................................................................... 5
3.1. Software Download ............................................................................................. 5
3.2. Project Information .............................................................................................. 5
4. Messaging Concepts ................................................................................................... 7
4.1. Messaging Concepts ........................................................................................... 7
4.2. Messaging styles ................................................................................................ 7
4.2.1. The Message Queue Pattern .................................................................... 8
4.2.2. The Publish-Subscribe Pattern .................................................................. 8
4.3. Delivery guarantees ............................................................................................ 9
4.4. Transactions ....................................................................................................... 9
4.5. Durability ............................................................................................................ 9
4.6. Messaging APIs and protocols ............................................................................ 9
4.6.1. Java Message Service (JMS) .................................................................. 10
4.6.2. System specific APIs .............................................................................. 10
4.6.3. RESTful API .......................................................................................... 10
4.6.4. STOMP ................................................................................................. 10
4.6.5. AMQP ................................................................................................... 11
4.7. High Availability ................................................................................................ 11
4.8. Clusters ............................................................................................................ 11
4.9. Bridges and routing ........................................................................................... 11
5. Architecture ............................................................................................................... 13
5.1. Core Architecture .............................................................................................. 13
5.2. HornetQ embedded in your own application ....................................................... 15
5.3. HornetQ integrated with a JEE application server ................................................ 15
5.4. HornetQ stand-alone server ............................................................................... 16
6. Using the Server ........................................................................................................ 19
6.1. Starting and Stopping the standalone server ....................................................... 19
6.2. Server JVM settings .......................................................................................... 19
6.3. Server classpath ............................................................................................... 20
6.4. Library Path ...................................................................................................... 20
6.5. System properties ............................................................................................. 20
6.6. Configuration files ............................................................................................. 20
6.7. JBoss Microcontainer Beans File ....................................................................... 22
6.8. JBoss AS4 MBean Service. ............................................................................... 24
6.9. The main configuration file. ............................................................................... 26
7. Using JMS ................................................................................................................. 27
7.1. A simple ordering system .................................................................................. 27
7.2. JMS Server Configuration .................................................................................. 27
7.3. Connection Factory Types ................................................................................. 28
7.4. JNDI configuration ............................................................................................ 29
7.5. The code .......................................................................................................... 30
7.6. Directly instantiating JMS Resources without using JNDI ..................................... 32