JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server Message Queue 4.5 Technical Overview
search filter icon
search icon

Document Information

Preface

1.  Messaging Systems: An Introduction

2.  Client Programming Model

Messaging Domains

Point-To-Point Messaging

Publish/Subscribe Messaging

Domain-Specific and Unified APIs

Programming Objects

Connection Factories and Connections

Sessions

Messages

Message Header

Message Properties

Message Body

Producing a Message

Consuming a Message

Synchronous and Asynchronous Consumers

Using Selectors to Filter Messages

Using Durable Subscribers

The Request-Reply Pattern

Reliable Message Delivery

Acknowledgements

Transactions

Local Transactions

Distributed Transactions

Persistent Storage

A Message's Journey Through the System

Message Production

Message Handling and Routing

Message Consumption

Message End-of-Life

Design and Performance

Working with SOAP Messages

Java and C Clients

3.  The Message Queue Broker

4.  Broker Clusters

5.  Message Queue and Java EE

A.  Message Queue Implementation of Optional JMS Functionality

B.  Message Queue Features

Glossary

Index

Consuming a Message

Messages are received by a message consumer, within the context of a connection and session. A client uses a message consumer object (MessageConsumer) to receive messages from a specified physical destination, represented in the API as a destination object.

When you create a consumer, you specify the destination from which it consumes messages.

Three factors affect how the broker delivers messages to a consumer:

These factors are described in the following sections.

Another factor that affects message delivery, the degree of reliability required by the messaging application, is described in Reliable Message Delivery.

In addition,Message Queue consumers can specify symbolic topic destination names that use wildcard characters. Messages are delivered to such wildcard consumers from all destinations that match the symbolic destination name. See Supported Topic Destination Names in Oracle GlassFish Server Message Queue 4.5 Administration Guide.

Synchronous and Asynchronous Consumers

A message consumer can support either synchronous or asynchronous consumption of messages.

Using Selectors to Filter Messages

A message consumer can use a message selector to have the message service deliver only those messages whose properties (see Message Properties) match specific selection criteria. You specify this criteria when you create the consumer.

Selectors use an SQL-like syntax to match against message properties. For example,

color = ”red’
size > 10

Java clients can also specify selectors when browsing a queue; this allows you to see which selected messages are waiting to be consumed.

Using Durable Subscribers

A durable subscriber is one for which the broker retains messages even when the subscriber becomes inactive.

Because the broker must maintain state for the subscriber and resume delivery of messages when the subscriber is reactivated, the broker must be able to identify a given subscriber throughout its comings and goings. The subscriber’s identity is constructed from the ClientID property of the connection that created it and the subscriber name specified when you create the subscriber.