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 failover listener
11.1.7. Client-Side Load-Balancing
11.1.8. Clustered Durable Subscription
11.1.9. Clustered Grouping
11.1.10. Clustered Queue
11.1.11. Clustering with JGroups
11.1.12. Clustered Standalone
11.1.13. Clustered Static Discovery
11.1.14. Clustered Static Cluster One Way
11.1.15. Clustered Topic
11.1.16. Message Consumer Rate Limiting
11.1.17. Dead Letter
11.1.18. Delayed Redelivery
11.1.19. Divert
11.1.20. Durable Subscription
11.1.21. Embedded
11.1.22. Embedded Simple
11.1.23. Message Expiration
11.1.24. HornetQ Resource Adapter example
11.1.25. HTTP Transport
11.1.26. Instantiate JMS Objects Directly
11.1.27. Interceptor
11.1.28. JAAS
11.1.29. JMS Bridge
11.1.30. JMX Management
11.1.31. Large Message
11.1.32. Last-Value Queue
11.1.33. Management
11.1.34. Management Notification
11.1.35. Message Counter
11.1.36. Message Group
11.1.37. Message Group
11.1.38. Message Priority
11.1.39. Multiple Failover
11.1.40. Multiple Failover Failback
11.1.41. No Consumer Buffering
11.1.42. Non-Transaction Failover With Server Data Replication
11.1.43. Paging
11.1.44. Pre-Acknowledge
11.1.45. Message Producer Rate Limiting
11.1.46. Queue
11.1.47. Message Redistribution
11.1.48. Queue Requestor
11.1.49. Queue with Message Selector
11.1.50. Reattach Node example
11.1.51. Replicated Failback example
11.1.52. Replicated Failback static example
11.1.53. Replicated multiple failover example
11.1.54. Replicated Failover transaction example
11.1.55. Request-Reply example
11.1.56. Rest example
11.1.57. Scheduled Message
11.1.58. Security
11.1.59. Send Acknowledgements
11.1.60. Spring Integration
11.1.61. SSL Transport
11.1.62. Static Message Selector
11.1.63. Static Message Selector Using JMS
11.1.64. Stomp
11.1.65. Stomp1.1
11.1.66. Stomp Over Web Sockets
11.1.67. Symmetric Cluster
11.1.68. Temporary Queue
11.1.69. Topic
11.1.70. Topic Hierarchy
11.1.71. Topic Selector 1
11.1.72. Topic Selector 2
11.1.73. Transaction Failover
11.1.74. Transactional Session
11.1.75. XA Heuristic
11.1.76. XA Receive
11.1.77. XA Send
11.1.78. 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. Resource Adapter Configuration
11.3.3. Resource Adapter Remote Server 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 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. Configuring Parameters
23.2.1. Using Core API
23.2.2. Using JMS
23.2.3. Compressed Large Messages
23.3. Streaming large messages
23.3.1. Streaming over Core API
23.3.2. Streaming over JMS
23.4. Streaming Alternative
23.5. 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. Dropping messages and throwing an exception to producers
24.6. Blocking producers
24.7. Caution with Addresses with Multiple Queues
24.8. 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. Extra Acknowledge Modes
29.1. Using PRE_ACKNOWLEDGE
29.2. Individual Acknowledge
29.3. 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.5.5. Notification Types and Headers
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.6.2. Changing the Security Domain
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
38. Clusters
38.1. Clusters Overview
38.2. Server discovery
38.2.1. Dynamic Discovery
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. Data Replication
39.1.3. Shared Store
39.1.4. Failing Back to live Server
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 in a client or with an Embedded server
42.2. Logging With The JBoss Application Server
43. REST Interface
43.1. Goals of REST Interface
43.2. Installation and Configuration
43.2.1. Installing Within Pre-configured Environment
43.2.2. Bootstrapping HornetQ Along with REST
43.2.3. REST Configuration
43.3. HornetQ REST Interface Basics
43.3.1. Queue and Topic Resources
43.3.2. Queue Resource Response Headers
43.3.3. Topic Resource Response Headers
43.4. Posting Messages
43.4.1. Duplicate Detection
43.4.2. Persistent Messages
43.4.3. TTL, Expiration and Priority
43.5. Consuming Messages via Pull
43.5.1. Auto-Acknowledge
43.5.2. Manual Acknowledgement
43.5.3. Blocking Pulls with Accept-Wait
43.5.4. Clean Up Your Consumers!
43.6. Pushing Messages
43.6.1. The Queue Push Subscription XML
43.6.2. The Topic Push Subscription XML
43.6.3. Creating a Push Subscription at Runtime
43.6.4. Creating a Push Subscription by Hand
43.6.5. Pushing to Authenticated Servers
43.7. Creating Destinations
43.8. Securing the HornetQ REST Interface
43.8.1. Within JBoss Application server
43.8.2. Security in other environments
43.9. Mixing JMS and REST
43.9.1. JMS Producers - REST Consumers
43.9.2. REST Producers - JMS Consumers
44. Embedding HornetQ
44.1. Simple Config File Embedding
44.1.1. Core API Only
44.1.2. JMS API
44.2. POJO instantiation - Embedding Programmatically
44.3. Dependency Frameworks
45. Spring Integration
46. Intercepting Operations
46.1. Implementing The Interceptors
46.2. Configuring The Interceptors
46.3. Interceptors on the Client Side
46.4. Example
47. Interoperability
47.1. Stomp
47.1.1. Native Stomp support
47.1.2. Mapping Stomp destinations to HornetQ addresses and queues
47.1.3. STOMP and connection-ttl
47.1.4. Stomp and JMS interoperability
47.1.5. Stomp Over Web Sockets
47.1.6. StompConnect
47.2. REST
47.3. AMQP
47.3.1. AMQP and security
47.3.2. AMQP Links
47.3.3. AMQP and destinations
47.3.4. AMQP and Coordinations - Handling Transactions
48. Performance Tuning
48.1. Tuning persistence
48.2. Tuning JMS
48.3. Other Tunings
48.4. Tuning Transport Settings
48.5. Tuning the VM
48.6. Avoiding Anti-Patterns
49. Configuration Reference
49.1. Server Configuration
49.1.1. hornetq-configuration.xml
49.1.2. hornetq-jms.xml
49.1.3. Using Masked Passwords in Configuration Files