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

Managing large messages with HornetQ


Up until now we have managed messages that were simple strings like the following one:

"ecg"/"1;02/20/2012 14:01:59.010;1020,1021,1022";

But as we pointed out in Chapter 3, Basic Coding with HornetQ: Creating and Consuming Messages, HornetQ is able to manage messages that can reach the magnitude of gigabytes using its internal storing system.

In this section, we will see how to pass an entire file to a HornetQ queue so that the message is stored in the file itself and not a single string.

Using our reference example, the need arises from the fact that modern medical equipments neither store nor send ECG messages directly into string format but use some predefined medical format.

We will not go into further details but even if there is no agreed format for the ECG measurement, we will use the most widely used format that is also an ANSI standard for medical measurements named HL7 (www.hl7.org). The main idea behind HL7 is to store the information concerning...