Book Image

HornetQ Messaging Developer's Guide

By : Piero Giacomelli
Book Image

HornetQ Messaging Developer's Guide

By: Piero Giacomelli

Overview of this book

<p>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.<br /><br />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.<br /><br />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.<br /><br />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.</p>
Table of Contents (18 chapters)
HornetQ Messaging Developer's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to our fictional example


There are some interesting fields of application for high-performance, messaging-oriented middleware such as finance, medicine, and, in general, whenever there is the need of exchanging a chunk of information in a very fast way.

Throughout this book, we will use the same fictional example that will help us to describe, chapter by chapter, the various functionalities of HornetQ both for software coding and framework configuration. The example may seem far from everyday software coding, with a database as a backend, and a frontend that could be a web interface or a GUI. However, the trickiness of the configuration and of its requirements will really help you see the advantages of using HornetQ to exchange messages.

Our fictional example deals with a software house that is developing a software called HomeECG. The main purpose of this software is to allow people to do an Electrocardiography (ECG) exam at home. An ECG device is able to detect and amplify the tiny electrical changes on the skin that are caused by the heart during contractions. Using such biophysical signals, a doctor is able to detect abnormal heart functionality. Every person who needs this capability at home will be equipped with a device that is able to trace the ECG, and send the data using an HTTP connection to a server inside a health care institution.

Describing how such a system works is outside the scope of this book, so we won't explain in detail all the requirements such a measurement device should have. For the purpose of our demo, the important thing is that we have many messages coming from different patients, which need to be stored in a queue and transformed, to be inserted in a more structured way inside a database system.

Considering this case, we also have to deal with some important performance issues arising from the fact that a normal ECG could take three different measurements ten times per second. So our HomeECG framework should be able to manage—if one hundred patients do the ECG for ten minutes, all at the same time—potentially, nearly two billion messages!

So we need a messaging framework that is able to process a large number of messages (such as ECG measures) in an asynchronous way and store them in the final database. Now that we have described our fictional software, we need to move onto a developer PC to see how to install and configure a full, testing environment.