8-6 Configuring and Managing JMS for Oracle WebLogic Server
For more information about the message selector syntax, see the javax.jms.Message Javadoc, available at
http:java.sun.comjavaee5docsapijavaxjmsMessage.html .
8.2.2.3 Moving Messages
You can forward a message from a source destination to a target destination under the following conditions:
■
The source destination is either a queue or a topic durable subscriber in the consumption-paused state.
■
The message state is either visible, delayed, or ordered.
■
The target destination is:
– in the same cluster as the source destination
– either a queue, a topic, or a topic durable subscriber
– not in the production-paused state
The message identifier does not change when you move a message. If the message being moved already exists on the target destination, a duplicate message with the
same identifier is added to the destination.
8.2.2.4 Deleting Messages
You can delete a specific message or drain all messages from a queue or topic durable subscriber under the following conditions:
■
The destination is in the consumption-paused state.
■
The message state is either visible, delayed, or ordered. The destination is locked while the delete operation occurs. If there is a failure during
the delete operation, it is possible that only a portion of the messages selected will be deleted.
8.2.2.5 Creating New Messages
You can create new messages to be sent to a destination. To produce a new message, provide the following information:
■
Message type – such as BytesMessage, TextMessage, StreamMessage, ObjectMessage, MapMessage, or XMLMessage.
Note: For more information about consumption-paused states, see
Section 10.5.4, Consumption Pause and Consumption Resume.
Note:
For more information about production-paused states, see Section 10.5.2, Production Pause and Production Resume.
Note: For more information about consumption-paused states, see
Section 10.5.4, Consumption Pause and Consumption Resume.
Monitoring JMS Statistics and Managing Messages 8-7
■
Correlation ID – a user-defined identifier for the message, often used to correlate messages about the same subject.
■
Expiration – specifies the expiration, or time-to-live value, for a message.
■
Priority – an indicator of the level of importance or urgency of the message, with 0 as the lowest priority and 9 as the highest. Usually, 0-4 are gradients of normal
priority and 5-9 are gradients of expedited priority. Priority is set to 4 by default.
■
Delivery Mode – specifies PERSISTENT or NON_PERSISTENT messaging.
■
Delivery Time – defines the earliest absolute time at which a message can be delivered to a consumer.
■
Redelivery Limit – the number of redelivery tries a message can have before it is moved to an error destination.
■
Header – every JMS message contains a standard set of header fields that is included by default and available to message consumers. Some fields can be set by
the message producers.
■
Body – the message content. For more information on JMS message properties, see Understanding WebLogic JMS
in Programming JMS for Oracle WebLogic Server.
8.2.2.6 Importing Messages