O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HornetQ Messaging Developer's Guide

Book Description

Avoid being stung by JBoss HornetQ messaging service whether you’re an existing user or a newcomer with this agile, fast-paced, example-rich guide.

  • Rethink the way you process messages in a stable, powerful and adaptive way, using the JBoss HornetQ messaging system.
  • Learn how to set up and code real-world, high performance message applications.
  • Real-world advanced medical scenario features as the main example that will lead you from the basics of enterprise messaging to the advanced features

In Detail

Messages and information can be exchanged at exponential speed with JBoss HornetQ asynchronous messaging middleware. Learn how to use the JAVA open source Message Oriented Framework, to build a high-performance, multi-protocol, embeddable, clustered system and manage millions of messages per second.

In the HornetQ Messaging Developer’s Guide you will find the most common applications of a message exchanger with example code, as part of real-world scenarios. This practical and applicable guide increases reader knowledge chapter by chapter, covering basics to the most advanced features.

You will start from a clean installation of a HornetQ sever and, having progressively become a HornetQ master, will finish by being able to use the framework embedded in your software and sharing information in a cluster environment.

Starting from writing and reading a single message, we will discover more advanced features like managing queues, clustering the server, and controlling the undelivered messages. The book deals with a real-world advanced medical scenario as the main example that will lead you from learning the basics to the advanced features of HornetQ.

Table of Contents

  1. HornetQ Messaging Developer's Guide
    1. Table of Contents
    2. HornetQ Messaging Developer's Guide
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with HornetQ
      1. A quick introduction to HornetQ
      2. Introduction to our fictional example
      3. Installation and configuration of the environment
        1. A word on the OS
      4. Downloading the software
      5. Installing HornetQ
      6. Installing HornetQ on Linux/Unix/Mac the easy way
        1. Installing Eclipse
        2. Installing and configuring MongoDB
      7. Configuring the Eclipse IDE for HornetQ
      8. Coding our first example
        1. Class fields
        2. Initializing the context
        3. Creating and opening the connection
        4. Producing the message
        5. Consuming the message
        6. Connecting to MongoDB
          1. Storing to MongoDB
        7. Closing everything
      9. Summary
    9. 2. Setting Up HornetQ
      1. Which HornetQ version do I need?
      2. What about the cloud?
      3. A word on the operating system
      4. System requirements
      5. Installing the Java Virtual Machine
      6. Installing the HornetQ standalone server
      7. Starting/stopping HornetQ
      8. Compiling from sources
      9. Basic HornetQ configuration
      10. Starting HornetQ as a service in Windows/Linux
        1. HornetQ as a service in Linux
        2. Automating the HornetQ startup in Windows
      11. HornetQ and JBoss AS 7
      12. Checking your setup/installation
      13. Summary
    10. 3. Basic Coding with HornetQ: Creating and Consuming Messages
      1. Installing Eclipse on Windows
      2. Installing NetBeans on Windows
      3. Installing NetBeans on Linux
      4. Post installation
      5. A 10,000 foot view of HornetQ
        1. Thinking, then coding
      6. The HornetQ core API example
        1. Preparing your development environment
        2. Creating a shared core API connection
        3. Creating and sharing a HornetQ session
        4. Coding a client consumer
        5. Testing the first message sent
        6. Coding the HornetQ core API consumer
      7. Putting everything together
      8. Final considerations
      9. Have you done your math?
      10. Summary
    11. 4. Monitoring HornetQ
      1. Managing HornetQ using the core API
        1. Configuring the environment
        2. Before using the management core API classes
        3. First example using the core
      2. JMS management API
        1. Calling the JMS management API
      3. Managing clients using JMX
        1. Setting up the server
        2. Listing all the clients connected to a queue using JMX
      4. Summary
    12. 5. Some More Advanced Features of HornetQ
      1. Managing large messages with HornetQ
        1. Managing large messages using JMS
        2. Managing large messages using the core API
      2. Managing undelivered messages
        1. Delay in redelivery
        2. Dead letter address
      3. Message priority
      4. Summary
    13. 6. Clustering with HornetQ
      1. First cluster with two different nodes
        1. Creating two nodes
        2. Configuring the nodes
        3. Running both the nodes
        4. Coding a message producer and consumer on a cluster
      2. Creating a sharing queue on a HornetQ cluster
      3. Configuring the environment
      4. Coding the clustered queue example
        1. Creating the connections
        2. Creating the producer and the consumers
        3. Producing and consuming the messages on the clustered queue
        4. Final considerations
      5. Summary
    14. 7. Divert and Filter Messages
      1. A more detailed description
      2. Configuring the servers
      3. Configuring the XML
        1. Changing the script
        2. Coding the example
        3. Some more advanced filtering possibilities
      4. Summary
    15. 8. Controlling Message Flow
      1. What happens when you send or receive a message (for real)
        1. Changing the size of the buffer for JMS connections
        2. Buffer size using Core API
        3. Controlling the consuming rate
      2. Controlling the producer side
      3. Summary
    16. 9. Ensuring Your HornetQ Security
      1. Configuring the HornetQ security
      2. Resuming the example on security and permissions
        1. Testing our permissions
          1. Cluster security
        2. Configuring the SSL connection
        3. Setting up an SSL connection
      3. Summary
    17. 10. HornetQ in JBoss Environment
      1. Configuring and installing JBoss
      2. Configuring HornetQ within JBoss
        1. Creating and managing queues/topics
      3. HornetQ and J2EE environment
      4. Summary
    18. 11. More on HornetQ Embedding
      1. Embedding the HornetQ server in your application
        1. Embedding HornetQ in a simple way
        2. Embedding JMS HornetQ server
        3. Embedding HornetQ to create a cluster
      2. Using STOMP with HornetQ
        1. Enabling STOMP in the standalone version
        2. Running an embedded STOMP server
      3. Using HornetQ with Spring
      4. Coding our example
        1. Adding the interface
        2. Creating the Bean
        3. Creating the configuration XML
        4. Creating the test class
      5. Summary
    19. Index