JBoss.orgCommunity Documentation

HornetQ User Manual

Putting the buzz in messaging

HornetQ Logo


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. JBoss AS4 MBean Service.
6.9. The main configuration file.
7. Using JMS
7.1. A simple ordering system
7.2. JMS Server Configuration
7.3. Connection Factory Types
7.4. JNDI configuration
7.5. The code
7.6. Directly instantiating JMS Resources without using JNDI
7.7. Setting The Client ID
7.8. Setting The Batch Size for DUPS_OK
7.9. 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. ServerLocator
8.1.5. ClientSessionFactory
8.1.6. ClientSession
8.1.7. ClientConsumer
8.1.8. ClientProducer
8.2. A simple example of using Core
9. Mapping JMS Concepts to the Core API
10. The Client Classpath
10.1. HornetQ Core Client
10.2. JMS Client
10.3. JMS Client with JNDI
11. Examples
11.1. JMS Examples
11.1.1. Applet
11.1.2. Application-Layer Failover
11.1.3. Core Bridge Example
11.1.4. Browser
11.1.5. Client Kickoff
11.1.6. Client-Side Load-Balancing
11.1.7. Clustered Durable Subscription
11.1.8. Clustered Grouping
11.1.9. Clustered Queue
11.1.10. Clustered Standalone
11.1.11. Clustered Static Discovery
11.1.12. Clustered Static Cluster One Way
11.1.13. Clustered Topic
11.1.14. Message Consumer Rate Limiting
11.1.15. Dead Letter
11.1.16. Delayed Redelivery
11.1.17. Divert
11.1.18. Durable Subscription
11.1.19. Embedded
11.1.20. Embedded Simple
11.1.21. Message Expiration
11.1.22. Failover Manual Stop
11.1.23. HTTP Transport
11.1.24. Instantiate JMS Objects Directly
11.1.25. Interceptor
11.1.26. JAAS
11.1.27. JMS Bridge
11.1.28. JMX Management
11.1.29. Large Message
11.1.30. Last-Value Queue
11.1.31. Management
11.1.32. Management Notification
11.1.33. Message Counter
11.1.34. Message Group
11.1.35. Message Group
11.1.36. Message Priority
11.1.37. Multiple Failover
11.1.38. Multiple Failover Failback
11.1.39. No Consumer Buffering
11.1.40. Non-Transaction Failover With Server Data Replication
11.1.41. Paging
11.1.42. Pre-Acknowledge
11.1.43. Message Producer Rate Limiting
11.1.44. Queue
11.1.45. Message Redistribution
11.1.46. Queue Requestor
11.1.47. Queue with Message Selector
11.1.48. Reattach Node example
11.1.49. Request-Reply example
11.1.50. Scheduled Message
11.1.51. Security
11.1.52. Send Acknowledgements
11.1.53. Spring Integration
11.1.54. SSL Transport
11.1.55. Static Message Selector
11.1.56. Static Message Selector Using JMS
11.1.57. Stomp
11.1.58. Stomp Over Web Sockets
11.1.59. Symmetric Cluster
11.1.60. Temporary Queue
11.1.61. Topic
11.1.62. Topic Hierarchy
11.1.63. Topic Selector 1
11.1.64. Topic Selector 2
11.1.65. Transaction Failover
11.1.66. Transactional Session
11.1.67. XA Heuristic
11.1.68. XA Receive
11.1.69. XA Send
11.1.70. 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. Resource Adapter Remote Server Configuration
11.3.5. JMS Bridge
11.3.6. MDB (Message Driven Bean)
11.3.7. Servlet Transport
11.3.8. Servlet SSL Transport
11.3.9. 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 jms journal
15.3. Configuring the message journal
15.4. An important note on disabling disk write cache.
15.5. Installing AIO
15.6. Configuring HornetQ for Zero Persistence
15.7. Import/Export the Journal Data
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. Detecting Dead Connections
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
18. Resource Manager Configuration
19. Flow Control
19.1. Consumer Flow Control
19.1.1. Window-Based Flow Control
19.1.2. Rate limited flow control
19.2. Producer flow control
19.2.1. Window based flow control
19.2.2. Rate limited flow control
20. Guarantees of sends and commits
20.1. Guarantees of Transaction Completion
20.2. Guarantees of Non Transactional Message Sends
20.3. Guarantees of Non Transactional Acknowledgements
20.4. Asynchronous Send Acknowledgements
20.4.1. Asynchronous Send Acknowledgements
21. Message Redelivery and Undelivered Messages
21.1. Delayed Redelivery
21.1.1. Configuring Delayed Redelivery
21.1.2. Example
21.2. Dead Letter Addresses
21.2.1. Configuring Dead Letter Addresses
21.2.2. Dead Letter Properties
21.2.3. Example
21.3. Delivery Count Persistence
22. Message Expiry
22.1. Message Expiry
22.2. Configuring Expiry Addresses
22.3. Configuring The Expiry Reaper Thread
22.4. Example
23. Large Messages
23.1. Configuring the server
23.2. Setting the limits
23.2.1. Using Core API
23.2.2. Using JMS
23.3. Streaming large messages
23.3.1. Streaming over Core API
23.3.2. Streaming over JMS
23.4. Streaming Alternative
23.5. Cache Large Messages on client
23.6. Large message example
24. Paging
24.1. Page Files
24.2. Configuration
24.3. Paging Mode
24.3.1. Configuration
24.4. Dropping messages
24.5. Blocking producers
24.6. Caution with Addresses with Multiple Queues
24.7. Paging and message selectors
24.8. Paging and browsers
24.9. Paging and unacknowledged messages
24.10. Example
25. Queue Attributes
25.1. Predefined Queues
25.2. Using the API
25.3. Configuring Queues Via Address Settings
26. Scheduled Messages
26.1. Scheduled Delivery Property
26.2. Example
27. Last-Value Queues
27.1. Configuring Last-Value Queues
27.2. Using Last-Value Property
27.3. Example
28. Message Grouping
28.1. Using Core API
28.2. Using JMS
28.3. Example
28.4. Example
28.5. Clustered Grouping
28.5.1. Clustered Grouping Best Practices
28.5.2. Clustered Grouping Example
29. Pre-Acknowledge Mode
29.1. Using PRE_ACKNOWLEDGE
29.2. Example
30. Management
30.1. The Management API
30.1.1. Core Management API
30.1.2. JMS Management API
30.2. Using Management Via JMX
30.2.1. Configuring JMX
30.2.2. Example
30.3. Using Management Via Core API
30.3.1. Configuring Core Management
30.4. Using Management Via JMS
30.4.1. Configuring JMS Management
30.4.2. Example
30.5. Management Notifications
30.5.1. JMX Notifications
30.5.2. Core Messages Notifications
30.5.3. JMS Messages Notifications
30.5.4. Example
30.6. Message Counters
30.6.1. Configuring Message Counters
30.6.2. Example
30.7. Administering HornetQ Resources Using The JBoss AS Admin Console
30.7.1. JMS Queues
30.7.2. JMS Topics
30.7.3. JMS Connection Factories
31. Security
31.1. Role based security for addresses
31.2. Secure Sockets Layer (SSL) Transport
31.3. Basic user credentials
31.4. Changing the security manager
31.5. JAAS Security Manager
31.5.1. Example
31.6. JBoss AS Security Manager
31.6.1. Configuring Client Login
31.7. Changing the username/password for clustering
32. Application Server Integration and Java EE
32.1. Configuring Message-Driven Beans
32.1.1. Using Container-Managed Transactions
32.1.2. Using Bean-Managed Transactions
32.1.3. Using Message Selectors with Message-Driven Beans
32.2. Sending Messages from within JEE components
32.3. MDB and Consumer pool size
32.4. Configuring the JCA Adaptor
32.4.1. Global Properties
32.4.2. Adapter Outbound Configuration
32.4.3. Adapter Inbound Configuration
32.4.4. Configuring the adapter to use a standalone HornetQ Server
32.5. Configuring the JBoss Application Server to connect to Remote HornetQ Server
32.5.1. Configuring Jboss 5
32.5.2. Configuring Jboss 5
32.6. High Availability JNDI (HA-JNDI)
32.7. XA Recovery
32.7.1. XA Recovery Configuration
32.7.2. Example
33. The JMS Bridge
33.1. JMS Bridge Parameters
33.2. Source and Target Connection Factories
33.3. Source and Target Destination Factories
33.4. Quality Of Service
33.4.1. AT_MOST_ONCE
33.4.2. DUPLICATES_OK
33.4.3. ONCE_AND_ONLY_ONCE
33.4.4. Time outs and the JMS bridge
33.4.5. Examples
34. Client Reconnection and Session Reattachment
34.1. 100% Transparent session re-attachment
34.2. Session reconnection
34.3. Configuring reconnection/reattachment attributes
34.4. ExceptionListeners and SessionFailureListeners
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. Discovery using UDP
38.2.2. Discovery using static Connectors
38.3. Server-Side Message Load Balancing
38.3.1. Configuring Cluster Connections
38.3.2. Cluster User Credentials
38.4. Client-Side Load balancing
38.5. Specifying Members of a Cluster Explicitly
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. Live - Backup Groups
39.1.1. HA modes
39.1.2. Shared Store
39.2. Failover Modes
39.2.1. Automatic Client Failover
39.2.2. Getting Notified of Connection Failure
39.2.3. Application-Level 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. Logging With The JBoss Application Server
43. Embedding HornetQ
43.1. Simple Config File Embedding
43.1.1. Core API Only
43.1.2. JMS API
43.2. POJO instantiation - Embedding Programmatically
43.3. Dependency Frameworks
43.4.
44. Spring Integration
45. Intercepting Operations
45.1. Implementing The Interceptors
45.2. Configuring The Interceptors
45.3. Interceptors on the Client Side
45.4. Example
46. Interoperability
46.1. Stomp
46.1.1. Native Stomp support
46.1.2. Mapping Stomp destinations to HornetQ addresses and queues
46.1.3. STOMP and connection-ttl
46.1.4. Stomp and JMS interoperabilty
46.1.5. Stomp Over Web Sockets
46.1.6. StompConnect
46.2. REST
46.3. AMQP
47. Performance Tuning
47.1. Tuning persistence
47.2. Tuning JMS
47.3. Other Tunings
47.4. Tuning Transport Settings
47.5. Tuning the VM
47.6. Avoiding Anti-Patterns
48. Configuration Reference
48.1. Server Configuration
48.1.1. hornetq-configuration.xml
48.1.2. hornetq-jms.xml