HornetQ 2.0 User Manual

Putting the buzz in messaging


Table of Contents

1. Legal Notice
2. Preface
3. Project Information
3.1. Software Download
3.2. Project Information
4. Messaging Concepts
4.1. Messaging Concepts
4.2. Messaging styles
4.2.1. The Message Queue Pattern
4.2.2. The Publish-Subscribe Pattern
4.3. Delivery guarantees
4.4. Transactions
4.5. Durability
4.6. Messaging APIs and protocols
4.6.1. Java Message Service (JMS)
4.6.2. System specific APIs
4.6.3. RESTful API
4.6.4. STOMP
4.6.5. AMQP
4.7. High Availability
4.8. Clusters
4.9. Bridges and routing
5. Architecture
5.1. Core Architecture
5.2. HornetQ embedded in your own application
5.3. HornetQ integrated with a JEE application server
5.4. HornetQ stand-alone server
6. Using the Server
6.1. Starting and Stopping the standalone server
6.2. Server JVM settings
6.3. Server classpath
6.4. Library Path
6.5. System properties
6.6. Configuration files
6.7. JBoss Microcontainer Beans File
6.8. The main configuration file.
7. Using JMS
7.1. A simple ordering system
7.2. JMS Server Configuration
7.3. JNDI configuration
7.4. The code
7.5. Directly instantiating JMS Resources without using JNDI
7.6. Setting The Client ID
7.7. Setting The Batch Size for DUPS_OK
7.8. Setting The Transaction Batch Size
8. Using Core
8.1. Core Messaging Concepts
8.1.1. Message
8.1.2. Address
8.1.3. Queue
8.1.4. ClientSessionFactory
8.1.5. ClientSession
8.1.6. ClientConsumer
8.1.7. ClientProducer
8.2. A simple example of using Core
9. Mapping JMS Concepts to the Core API
10. The Client Classpath
10.1. Pure Core Client
10.2. JMS Client
10.3. JNDI
11. Examples
11.1. JMS Examples
11.1.1. Application-Layer Failover
11.1.2. Automatic (Transparent) Failover
11.1.3. Automatic Reconnect
11.1.4. Browser
11.1.5. Core Bridge Example
11.1.6. Client Kickoff
11.1.7. Client Side Load-Balancing
11.1.8. Clustered Queue
11.1.9. Clustered Standalone
11.1.10. Clustered Topic
11.1.11. Dead Letter
11.1.12. Delayed Redelivery
11.1.13. Divert
11.1.14. Durable Subscription
11.1.15. Embedded
11.1.16. HTTP Transport
11.1.17. Instantiate JMS Objects Directly
11.1.18. Interceptor
11.1.19. JAAS
11.1.20. JMX Management
11.1.21. Large Message
11.1.22. Last-Value Queue
11.1.23. Load Balanced Clustered Queue
11.1.24. Management
11.1.25. Management Notification
11.1.26. Message Consumer Rate Limiting
11.1.27. Message Counter
11.1.28. Message Expiration
11.1.29. Message Group
11.1.30. Message Producer Rate Limiting
11.1.31. Message Priority
11.1.32. Message Redistribution
11.1.33. No Consumer Buffering
11.1.34. Paging
11.1.35. Pre-Acknowledge
11.1.36. Queue
11.1.37. Queue Requestor
11.1.38. Queue with Message Selector
11.1.39. Request-Response
11.1.40. Scheduled Message
11.1.41. Security
11.1.42. Send Acknowledgements
11.1.43. Static Message Selector
11.1.44. Static Message Selector Using JMS
11.1.45. SSL Transport
11.1.46. Symmetric Cluster
11.1.47. Temporary Queue
11.1.48. Topic
11.1.49. Topic Hierarchy
11.1.50. Topic Selector 1
11.1.51. Topic Selector 2
11.1.52. Transactional Session
11.1.53. XA Heuristic
11.1.54. XA Receive
11.1.55. XA Send
11.1.56. XA with Transaction Manager
11.2. Core API Examples
11.2.1. Embedded
11.3. Java EE Examples
11.3.1. EJB/JMS Transaction
11.3.2. HAJNDI (High Availability)
11.3.3. Resource Adapter Configuration
11.3.4. JMS Bridge
11.3.5. MDB (Message Driven Bean)
11.3.6. Servlet Transport
11.3.7. Servlet SSL Transport
11.3.8. XA Recovery
12. Routing Messages With Wild Cards
13. Understanding the HornetQ Wildcard Syntax
14. Filter Expressions
15. Persistence
15.1. Configuring the bindings journal
15.2. Configuring the message journal
15.3. Installing AIO
15.4. Configuring HornetQ for Zero Persistence
16. Configuring the Transport
16.1. Understanding Acceptors
16.2. Understanding Connectors
16.3. Configuring the transport directly from the client side.
16.4. Configuring the Netty transport
16.4.1. Configuring Netty TCP
16.4.2. Configuring Netty SSL
16.4.3. Configuring Netty HTTP
16.4.4. Configuring Netty Servlet
17. Dead Connections and Session Multiplexing
17.1. Cleaning up Dead Connection Resources on the Server
17.1.1. Closing core sessions or JMS connections that you have failed to close
17.2. Detecting failure from the client side.
17.3. Configuring Asynchronous Connection Execution
17.4. Session Multiplexing
18. Resource Manager Configuration
19. Flow Control
19.1. Consumer Flow Control
19.1.1. Window-Based Flow Control
19.1.1.1. Using Core API
19.1.1.2. Using JMS
19.1.2. Rate limited flow control
19.1.2.1. Using Core API
19.1.2.2. Using JMS
19.2. Producer flow control
19.2.1. Window based flow control
19.2.2. Rate limited flow control
19.2.2.1. Using Core API
19.2.2.2. Using JMS
20. Command Buffering
21. Guarantees of sends and commits
21.1. Guarantees of Transaction Completion
21.2. Guarantees of Non Transactional Message Sends
21.3. Guarantees of Non Transactional Acknowledgements
21.4. Asynchronous Send Acknowledgements
21.4.1. Asynchronous Send Acknowledgements
22. Message Redelivery and Undelivered Messages
22.1. Delayed Redelivery
22.1.1. Configuring Delayed Redelivery
22.1.2. Example
22.2. Dead Letter Addresses
22.2.1. Configuring Dead Letter Addresses
22.2.2. Dead Letter Properties
22.2.3. Example
22.3. Delivery Count Persistence
23. Message Expiry
23.1. Message Expiry
23.2. Configuring Expiry Addresses
23.3. Configuring The Expiry Reaper Thread
23.4. Example
24. Large Messages
24.1. Configuring the server
24.2. Setting the limits
24.2.1. Using Core API
24.2.2. Using JMS
24.3. Streaming large messages
24.3.1. Streaming over Core API
24.3.2. Streaming over JMS
24.4. Streaming Alternative
24.5. Cache Large Messages on client
24.6. Large message example
25. Paging
25.1. Page Files
25.2. Configuration
25.3. Paging Mode
25.3.1. Configuration
25.4. Caution with Addresses with Multiple Queues
25.5. Example
26. Queue Attributes
26.1. Predefined Queues
26.2. Using the API
26.3. Configuring Queues Via Address Settings
27. Scheduled Messages
27.1. Scheduled Delivery Property
27.2. Example
28. Last-Value Queues
28.1. Configuring Last-Value Queues
28.2. Using Last-Value Property
28.3. Example
29. Message Grouping
29.1. Using Core API
29.2. Using JMS
29.3. Example
30. Pre-Acknowledge Mode
30.1. Using PRE_ACKNOWLEDGE
30.2. Example
31. Management
31.1. The Management API
31.1.1. Core Management API
31.1.1.1. Core Server Management
31.1.1.2. Core Address Management
31.1.1.3. Core Queue Management
31.1.1.4. Other Core Resources Management
31.1.2. JMS Management API
31.1.2.1. JMS Server Management
31.1.2.2. JMS ConnectionFactory Management
31.1.2.3. JMS Queue Management
31.1.2.4. JMS Topic Management
31.2. Using Management Via JMX
31.2.1. Configuring JMX
31.2.1.1. MBeanServer configuration
31.2.2. Example
31.3. Using Management Via Core API
31.3.1. Configuring Core Management
31.4. Using Management Via JMS
31.4.1. Configuring JMS Management
31.4.2. Example
31.5. Management Cluster Credentials
31.6. Management Notifications
31.6.1. JMX Notifications
31.6.2. Core Messages Notifications
31.6.2.1. Configuring The Core Management Notification Address
31.6.3. JMS Messages Notifications
31.6.4. Example
31.7. Message Counters
31.7.1. Configuring Message Counters
31.7.2. Example
32. Security
32.1. Role based security for addresses
32.2. Secure Sockets Layer (SSL) Transport
32.3. Basic user credentials
32.4. Changing the security manager
32.5. JAAS Security Manager
32.5.1. Example
32.6. JBoss AS Security Manager
32.7. Changing the Management Password for Clustering
33. Application Server Integration and Java EE
33.1. Configuring Message Driven Beans
33.1.1. Using Container Managed Transactions
33.1.2. Using Bean Managed Transactions
33.1.3. Using Message Selectors with MDB's
33.2. Sending Messages from within JEE components
33.3. Configuring the JCA Adaptor
33.3.1. Adapter Global properties
33.3.2. Adapter Outbound configuration
33.3.3. Adapter Inbound configuration
33.4. High Availability JNDI (HA-JNDI)
33.5. The JMS Bridge
33.5.1. JMS Bridge Parameters
33.5.2. Source and Target Connection Factories
33.5.3. Source and Target Destination Factories
33.5.4. Quality Of Service
33.5.4.1. AT_MOST_ONCE
33.5.4.2. DUPLICATES_OK
33.5.4.3. ONCE_AND_ONLY_ONCE
33.5.4.4. Example
33.6. XA Recovery
33.6.1. XA Recovery Configuration
33.6.1.1. Configuration Settings
33.6.2. Example
34. Client Reconnection
35. Diverting and Splitting Message Flows
35.1. Exclusive Divert
35.2. Non-exclusive Divert
36. Core Bridges
36.1. Configuring Bridges
37. Duplicate Message Detection
37.1. Using Duplicate Detection for Message Sending
37.2. Configuring the Duplicate ID Cache
37.3. Duplicate Detection and Bridges
37.4. Duplicate Detection and Cluster Connections
37.5. Duplicate Detection and Paging
38. Clusters
38.1. Clusters Overview
38.2. Server discovery
38.2.1. Broadcast Groups
38.2.2. Discovery Groups
38.2.3. Defining Discovery Groups on the Server
38.2.4. Discovery Groups on the Client Side
38.2.4.1. Configuring client discovery using JMS
38.2.4.2. Configuring client discovery using Core
38.3. Server-Side Message Load Balancing
38.3.1. Configuring Cluster Connections
38.4. Client-Side Load balancing
38.5. Specifying Members of a Cluster Explicitly
38.5.1. Specify List of Servers on the Client Side
38.5.1.1. Specifying List of Servers using JMS
38.5.1.2. Specifying List of Servers using the Core API
38.5.2. Specifying List of Servers to form a Cluster
38.6. Message Redistribution
38.7. Cluster topologies
38.7.1. Symmetric cluster
38.7.2. Chain cluster
39. High Availability and Failover
39.1. Server replication
39.1.1. Configuring live-backup pairs
39.1.2. Synchronization of live-backup pairs
39.1.3. Queue activation timeout
39.2. Automatic client failover
39.3. Application-level client failover
40. Libaio Native Libraries
40.1. Compiling the native libraries
40.1.1. Install requirements
40.1.2. Invoking the compilation
41. Thread management
41.1. Server-Side Thread Management
41.1.1. Server Scheduled Thread Pool
41.1.2. General Purpose Server Thread Pool
41.1.3. Expiry Reaper Thread
41.1.4. Asynchronous IO
41.2. Client-Side Thread Management
42. Logging
42.1. Log4j Configuration
42.2. Logging With The JBoss Application Server
43. Embedding HornetQ
43.1. POJO instantiation
43.2. Dependency Frameworks
43.3. Connecting to the Embedded HornetQ
43.3.1. Core API
43.3.2. JMS API
43.4. JMS Embedding Example
44. Intercepting Operations
44.1. Implementing The Interceptors
44.2. Configuring The Interceptors
44.3. Example
45. Interoperability
45.1. Stomp and StompConnect
45.2. REST
45.3. AMQP
46. Performance Tuning
46.1. Tuning the journal
46.2. Tuning JMS
46.3. Other Tunings
46.4. Tuning Transport Settings
46.5. Tuning the VM
46.6. Avoiding Anti-Patterns
47. Configuration Reference
47.1. Server Configuration
47.1.1. hornetq-configuration.xml
47.1.2. hornetq-jms.xml