JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS JMS Reference     Java CAPS Documentation
search filter icon
search icon

Document Information

Java CAPS JMS Reference

Introduction to JMS

JMS and Java CAPS

Java Message Service

JMS Message Servers

JMS Message Destinations

JMS Clients

JMS Object Type Definitions

JMS Library File

Implementing JMS in Java CAPS Projects

Integration Model

To Implement JMS Following the Java CAPS Model

Creating and Configuring Message Destinations

Creating OTDs and Collaborations

Configuring JMS Clients

Configuring Message Servers

Creating Component Mappings

Using the JMS OTD in Collaboration Definitions

Using JMS Messages in Collaboration Definitions

Inside the JMS IQ Manager

JMS Messaging Features

Message Delivery Order

Message Producer Priorities

Distributed Transactions

Security

Runtime Management

JMS IQ Manager Database

Database Files

Database Location

Database Configuration and Operation

Message Processing Order

JMS IQ Manager Delivery Modes

Fully Concurrent Processing

Protected Concurrent Processing

Fully Serialized Processing

Serial Processing Across a Destination Group

JMS Client Delivery Modes

Message Producer Priorities

Message Redelivery and Redirection

Redelivery Options

Progressive Delay

Example 1

Example 2

Delay and Redirect

Example 3

Example 4

Delay and Delete

Example 5

Specifying Redelivery Options in the JMS IQ Manager

Specifying Redelivery Options in a JMS Client

Enqueued Message Properties

Enqueue Time

Sequence Number

Performance Issues

Throttling Producers

Example of Producer Throttling and Unthrottling

JMS Object Type Definitions

Message Types

JMS Message Properties

JMS Message Header Properties

Additional JMS Message Properties

JMS OTD Methods

createBytesMessage()

Description

Parameters

Return Value

Exceptions

createBytesMessage(msg)

Description

Parameters

Return Value

Exceptions

createMapMessage()

Description

Parameters

Return Value

Exceptions

createMessage()

Description

Parameters

Return Value

Exceptions

createMessage(msg)

Description

Parameters

Return Value

Exceptions

createStreamMessage()

Description

Parameters

Return Value

Exceptions

createTextMessage()

Description

Parameters

Return Value

Exceptions

createTextMessage(msg)

Description

Parameters

Return Value

Exceptions

getDeliveryMode()

Description

Parameters

Return Value

Exceptions

getDestination()

Description

Parameters

Return Value

Exceptions

Also Accessible From

getMessageServerURL()

Description

Parameters

Return Value

Exceptions

getPriority()

Description

Parameters

Return Value

Exceptions

getTimeToLive()

Description

Parameters

Return Value

Exceptions

receive(timeout)

Description

Parameters

Return Value

Exceptions

receive(timeout, destination)

Description

Parameters

Return Value

Exceptions

receiveNoWait()

Description

Parameters

Return Value

Exceptions

receiveNoWait(destination)

Description

Parameters

Return Value

Exceptions

requestReply(message)

Description

Parameters

Return Value

Exceptions

requestReply(timeout, message)

Description

Parameters

Return Value

Exceptions

requestReplyTo(message, destName)

Description

Parameters

Return Value

Exceptions

requestReplyTo(timeout, message, destName)

Description

Parameters

Return Value

Exceptions

send(message)

Description

Parameters

Return Value

Exceptions

send(message, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendBytes(payload)

Description

Parameters

Return Value

Exceptions

sendBytes(payload, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendBytesTo(payload, destination)

Description

Parameters

Return Value

Exceptions

sendBytesTo(payload, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendText(payload)

Description

Parameters

Return Value

Exceptions

sendText(payload, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendTextTo(payload, destination)

Description

Parameters

Return Value

Exceptions

sendTextTo(payload, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

sendTo(message, destination)

Description

Parameters

Return Value

Exceptions

sendTo(message, destination, deliveryMode, priority, timeToLive)

Description

Parameters

Return Value

Exceptions

setDeliveryMode(arg0)

Description

Parameters

Return Value

Exceptions

setDestination(arg0)

Description

Parameters

Return Value

Exceptions

Also Accessible From

setMessageServerURL(arg0)

Description

Parameters

Return Value

Exceptions

setPriority(arg0)

Description

Parameters

Return Value

Exceptions

setTimeToLive(arg0)

Description

Parameters

Return Value

Exceptions

JMS Message Methods

countMapMessage()

Description

Parameters

Return Value

Exceptions

countStreamMessage()

Description

Parameters

Return Value

Exceptions

countUserProperty()

Description

Parameters

Return Value

Exceptions

getBytesMessage()

Description

Parameters

Return Value

Exceptions

getJMSMessageType()

Description

Parameters

Return Value

Exceptions

getMapMessage()

Description

Parameters

Return Value

Exceptions

getMapMessage(arg0)

Description

Parameters

Return Value

Exceptions

getMessageProperties()

Description

Parameters

Return Value

Exceptions

getStreamMessage()

Description

Parameters

Return Value

Exceptions

getStreamMessage(arg0)

Description

Parameters

Return Value

Exceptions

getTextMessage()

Description

Parameters

Return Value

Exceptions

getUserProperty()

Description

Parameters

Return Value

Exceptions

getUserProperty(arg0)

Description

Parameters

Return Value

Exceptions

retrieveBytesFromMessage()

Description

Parameters

Return Value

Exceptions

retrieveBytesFromMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveMapMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveMapMessageList()

Description

Parameters

Return Value

Exceptions

retrieveStringFromMessage()

Description

Parameters

Return Value

Exceptions

retrieveStringFromMessage(arg0)

Description

Parameters

Return Value

Exceptions

retrieveUserProperty(arg0)

Description

Parameters

Return Value

Exceptions

retrieveUserPropertyList()

Description

Parameters

Return Value

Exceptions

setBytesMessage(arg0)

Description

Parameters

Return Value

Exceptions

setJMSMessageType(arg0)

Description

Parameters

Return Value

Exceptions

setStreamMessage(arg0, arg1)

Description

Parameters

Return Value

Exceptions

setTextMessage(arg0)

Description

Parameters

Return Value

Exceptions

storeMapMessage(arg0, arg1)

Description

Parameters

Return Value

Exceptions

storeUserProperty(arg0, arg1)

Description

Parameters

Return Value

Exceptions

getTimeToWait()

Description

Parameters

Return Value

Exceptions

setTimeToWait(arg0)

Description

Parameters

Return Value

Exceptions

JMS Client Configuration

Categories

Consumers

Action

Allowed Values

Default Value

Concurrency

Default Value

Delay

Allowed Values

Default Value

Durable Subscriber Name

Durability

Allowed Values

Default Value

Message Selector

Move/Delete After N Times

Allowed Values

Default Value

Move to Queue/Topic

Allowed Values

Default Value

Move to Destination Name

Allowed Values

Default Value

Server Session Batch Size

Server Session Pool Size

Allowed Values

Default Value

Producers

Delivery Mode

Default Value

Idle Timeout

Default Value

Maximum Pool Size

Default Value

Maximum Wait Time

Default Value

Priority

Allowed Values

Default Value

Steady Pool Size

Default Value

Transaction Mode

Allowed Values

Default Value

JMS IQ Manager Runtime Configuration

Accessing the Configuration Properties

Configuration Properties Interface

Stable Storage Page

Segment Properties

Data Directory

Default Location

Block Size

Allowed Values

Default Value

Segment Size

Allowed Values

Default Value

Minimum Number of Segments

Allowed Values

Default Value

Maximum Number of Segments

Allowed Values

Default Value

Sync to Disk

Default Condition

Journaling and Expiration Properties

Enable Message Expiration

Maximum Lifetime

Default Value

Enable Journal

Default Condition

Journaling Maximum Lifetime

Default Value

Journal Directory

Allowed Values

Default Value

Messaging Behavior Page

Throttling Properties

Per-Destination Throttling Threshold

Allowed Values

Default Value

Server Throttling Threshold

Allowed Values

Default Value

Throttling Lag

Allowed Values

Default Value

Special FIFO Mode Properties

Fully Serialized Queues

Allowed Values

Protected Concurrent Queues

Allowed Values

FIFO Expiration Time

Default Value

Time Dependency Properties

Allowed Values

Access Control Page

Security Options

Default Condition

Diagnostics Page

Diagnostic Properties

Logging Level

Default Setting

Logging Level of Journaler

Default Condition

Maximum Log File Size

Allowed Values

Default value

Number of Backup Log Files

Allowed Values

Default value

Miscellaneous Page

Enable Alert Option

Default Condition

JMS Provider Management

Overview of MS Control Utility Features

MS Control Utility Details

Flags and Arguments

Syntax

Using the MS Control Utility

To Change Message Contents

To Create a Backup Archive File

To Access an Archive File

To Set the MS Control Utility Timeout Period

To Shut the Server Down

Command/Response Examples

Message Server Example

Message Destination (Queue) Examples

Message Destination (Topic) Examples

Message Examples

Troubleshooting

Timestamp Errors

Index

Message Processing Order

You have several options for controlling the message processing order in Java CAPS Projects:

JMS IQ Manager Delivery Modes

For a single consumer with a single process, processing for queues is fully serialized, by default. The process of processing a message is as follows:

  1. The receiver requests, or is ready to receive, a message

  2. The receiver receives the message

  3. The receiver processes the message

When multiple receivers or multiple processes within a single receiver subscribe to the same message destination (queues only), you have a choice of three first-in, first-out (FIFO) delivery modes, as listed below. These ordering modes apply globally to all queues in the Java CAPS Project

Fully Concurrent Processing

In fully concurrent mode, receivers can retrieve messages from a destination only when all older messages have been received or are in the process of being received. Receivers can then commit messages without restrictions. By default, JMS IQ Managers use fully concurrent processing for queues.

Figure 5 Fully Concurrent Processing

image:Diagram explained in accompanying text.

The figure above shows a sample delivery sequence for fully concurrent processing. In steps 1 and 2, the receivers retrieve their messages from the input queue. Both receivers must wait until each consumer has retrieved its messages, or is in the process of retrieving them, before they are able to commit messages to the output destination.

As steps 3 and 4 infer, receivers can commit messages in any order; therefore, messages can be committed out of sequence, which might not be acceptable. For example, a patient release record may be committed before the patient admittance record is committed. The following table indicates the benefits and drawbacks of fully concurrent processing.

Table 1 Tradeoffs for Fully Concurrent Processing

Benefits
Drawbacks
Provides the highest performance.
Delivery is not time-sequenced.
Receivers are not hampered by other receivers.

Protected Concurrent Processing

In protected concurrent mode, receivers retrieve messages just as in fully concurrent mode, after all messages have been received or are being received. Messages can only be committed, however, if all older messages have previously been committed.

Figure 6 Protected Concurrent Processing

image:Diagram explained in accompanying text.

The figure above shows a sample delivery sequence for protected concurrent processing. In steps 1 and 2, the receivers retrieve their messages from the input queue. Both receivers must wait until each consumer has retrieved, or is in the process of retrieving, its messages before being able to commit messages to the output destination. ReceiverB might be ready to commit its message before ReceiverA, but must wait until ReceiverA commits its message (step 3). Only when ReceiverA’s message has been committed, can ReceiverB commit its message (step 4).

Protected concurrent processing thus is a more workable solution in a scenario where a Project deals with messages such as patient records, where the admittance record must be committed before the release record.

The following table shows the benefits and drawbacks of protected concurrent processing.

Table 2 Tradeoffs for Protected Concurrent Processing

Benefits
Drawbacks
Provides better performance than serialized processing.
Provides lower performance than fully concurrent processing.
Messages are delivered by time sequence.

You specify protected concurrent processing for JMS IQ Managers with the Protected Concurrent Queues property as described in Special FIFO Mode Properties.


Note - By design, protected concurrent FIFO works only within one transaction, either in the form of one session or in the form of one XA transaction on the same server. You should always use XA when using the protected concurrent FIFO mode with a message-driven bean (MDB), since Java CAPS does not support single sessions with MDBs.


Fully Serialized Processing

In fully serialized mode, receivers can only retrieve messages after all older messages have been received and committed.

Figure 7 Fully Serialized Processing

image:Diagram explained in accompanying text.

The figure above shows a sample delivery sequence for serialized processing. In step 1, ReceiverA retrieves its message. ReceiverB might at this point be ready to receive its message, but must wait until ReceiverA has committed its message. After ReceiverA commits the message in step 2, ReceiverB can then retrieve and commit its message (steps 3 and 4).

The following table shows the benefits and drawbacks of protected concurrent processing.

Table 3 Tradeoffs for Fully Serialized Processing

Benefits
Drawbacks
Guaranteed delivery by time sequence.
Provides the lowest performance of all FIFO modes.

You specify fully serialized processing for JMS IQ Managers with the Fully Serialized Queues property as described in Special FIFO Mode Properties.

Serial Processing Across a Destination Group

You can also specify delivery order specifically for a set of topics and queues (time order groups). For these groups, consumers can only receive messages when all other messages in the time order group have been received or are in the process of being received. For information on specifying a time order group, refer to Time Dependency Properties.

JMS Client Delivery Modes

The delivery order options above are configured for the JMS IQ Manager. The Oracle Java CAPS Enterprise Service Bus JMS implementation enables you to configure topic subscribers as connection consumers to improve message throughput through concurrent processing. You can set the JMS client configuration with the Concurrency property as described in Concurrency.

The use of connection consumers increases message processing performance by enabling concurrent processing using multiple threads. You can specify the number of message driven beans (MDBs) or the server session pool to assign to a JMS Collaboration to process messages concurrently. When you use connection consumer with fully concurrent or protected concurrent FIFO processing, this default setting allows the integration server to assign multiple threads to execute the Collaboration on a particular message destination.

For queues, you can also process messages concurrently using multiple integration servers; these integration servers may run on different systems.

Using a JMS client connection consumer affects the message processing order. For example, consider the scenario shown in the following figure. The JMS IQ Manager is set to fully concurrent FIFO processing. However, each Collaboration on each integration server retrieves messages as they come in, and is able to commit them unrestricted to the queue. Therefore, although the JMS IQ Manager is configured for fully concurrent FIFO processing, message order cannot be guaranteed.

Figure 8 Multiple Application Server Configuration

image:Diagram explained in accompanying text.

The concurrency mode affects FIFO processing in several ways. The following table lists how the JMS client concurrency mode settings affect the JMS IQ Manager FIFO mode selections for topics. For topics, only one integration server per subscriber can be used.

Table 4 Concurrency/FIFO Mode Interaction: Topics

Concurrency Mode
Fully Concurrent FIFO Mode
Serial mode
Fully serialized
Connection consumer
No strict order maintained

The following table lists how the JMS client concurrency mode settings affect the JMS IQ Manager FIFO mode selections for queues.

Table 5 Concurrency/FIFO Mode Interaction: Queues

Application Servers
Concurrency Mode
FIFO Mode
Fully Serialized
Protected Concurrent
Fully Concurrent
Single
Serial
Fully serialized
Protected concurrent
Fully serialized
No concurrency
No concurrency
No concurrency
Connection consumer
Fully serialized
Protected concurrent
No strict order
No concurrency
Concurrent
Concurrent
Multiple
Serial
Fully serialized
Protected concurrent
No strict order
No concurrency
Concurrent
Concurrent
Connection consumer
Fully serialized
Protected concurrent
No strict order
No concurrency
Concurrent
Concurrent