Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server Message Queue 4.5 Developer's Guide for Java Clients |
3. Message Queue Clients: Design and Features
To Implement Message-Based Monitoring
Creating a Metrics-Monitoring Client
Metrics Monitoring Client Code Examples
A Destination List Metrics Example
6. Embedding a Message Queue Broker in a Java Client
Message Queue provides several ways of obtaining metrics data as a means of monitoring and tuning performance. One of these methods, message-based monitoring, allows metrics data to be accessed programmatically and then to be processed in whatever way suits the consuming client. Using this method, a client subscribes to one or more metrics destinations and then consumes and processes messages produced by the broker to those destinations. Message-based monitoring is the most customized solution to metrics gathering, but it does require the effort of writing a consuming client that retrieves and processes metrics messages.
The methods for obtaining metrics data are described in Chapter 13, Monitoring Broker Operations, in Oracle GlassFish Server Message Queue 4.5 Administration Guide, which also discusses the relative merits of each method and the set of data that is captured by each. Before you decide to used message-based monitoring, you should consult this guide to make sure that you will be able to obtain the information you need using this method.
Message-based monitoring is enabled by the combined efforts of administrators and programmers. The administrator is responsible for configuring the broker so that it produces the messages of interest at a specified interval and that it persists these messages for a set time. The programmer is responsible for selecting the data to be produced and for creating the client that will consume and process the data.
This chapter focuses on the work the programmer must do to implement a message-based monitoring client. It includes the following sections: