Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Java CAPS JMS Reference Java CAPS Documentation |
Implementing JMS in Java CAPS Projects
To Implement JMS Following the Java CAPS Model
Creating and Configuring Message Destinations
Creating OTDs and Collaborations
Using the JMS OTD in Collaboration Definitions
Using JMS Messages in Collaboration Definitions
Database Configuration and Operation
Protected Concurrent Processing
Serial Processing Across a Destination Group
Message Redelivery and Redirection
Specifying Redelivery Options in the JMS IQ Manager
Specifying Redelivery Options in a JMS Client
Example of Producer Throttling and Unthrottling
Additional JMS Message Properties
requestReply(timeout, message)
requestReplyTo(message, destName)
requestReplyTo(timeout, message, destName)
send(message, deliveryMode, priority, timeToLive)
sendBytes(payload, deliveryMode, priority, timeToLive)
sendBytesTo(payload, destination)
sendBytesTo(payload, destination, deliveryMode, priority, timeToLive)
sendText(payload, deliveryMode, priority, timeToLive)
sendTextTo(payload, destination)
sendTextTo(payload, destination, deliveryMode, priority, timeToLive)
sendTo(message, destination, deliveryMode, priority, timeToLive)
retrieveBytesFromMessage(arg0)
retrieveStringFromMessage(arg0)
JMS IQ Manager Runtime Configuration
Accessing the Configuration Properties
Configuration Properties Interface
Journaling and Expiration Properties
Per-Destination Throttling Threshold
Overview of MS Control Utility Features
To Create a Backup Archive File
This topic contains selected examples of commands and responses using typical values and data.
Example 2 Displaying JMS IQ Manager Status
Command:
stcmsctrlutil -host localhost -port 24055 -status
Response:
Up since: Tue Oct 14 20:54:23 2003 Memory used by data messages: 950.729 K(Bytes) Total messages passed through: 1900331 Total messages retained: 3555 Number of message queue(s): 9 Number of connection(s): 14 Port number: 18007 Process ID: 2780 Server state: Ready and running...
Example 3 Displaying an Active Queue List
Command:
stcmsctrlutil -host localhost -port 24055 -queuelist
Response:
Queue List: MyQueue0 PTP
Example 4 Displaying Active Queue Status
This example displays the current status of the queue PTP.
Command:
stcmsctrlutil -host localhost -port 24055 -queuestat PTP
Response:
Queue Name: PTP First enqueue time: 02011970:00:00:00 Last enqueue time: 02011970:00:00:00 Number of current receivers: 2 Message count: 4 Messages sent and committed: 245 Min sequence number: 245 Max sequence number: 248 Suspended: No
The enqueue times and sequence numbers are described in Enqueued Message Properties.
Example 5 Displaying Journaled Queue Status
This example displays journaled information about queue Q0.
Command:
stcmsctrlutil -j -qs Q0
Response:
Queue Name: Q0 First enqueue time: 09122003:00:14:07 Last enqueue time: 09122003:00:14:28 Number of current receivers: 0 Message count: 1001 Messages sent and committed: 0 Min sequence Number: 0 Max sequence Number: 1000
Example 6 Displaying Properties of All Receivers
Command:
stcmsctrlutil -host localhost -port 24055 -recvlistall
Response:
Number Of Receiver(s): 3 Receiver ID: 14235659 Queue name: MyQueue0 Session ID: 1 Committed messages: 0 Uncommitted messages: 0 Receiver ID: 14274653 Queue name: PTP Session ID: 3 Committed messages: 434 Uncommitted messages: 0 Receiver ID: 14291939 Queue name: PTP Session ID: 4 Committed messages: 432 Uncommitted messages: 1
Example 7 Displaying Properties of All Receivers of Queues
Command:
stcmsctrlutil -host localhost -port 24055 -recvlistforqueue PTP
Response:
Number Of Receiver(s): 2 Receiver ID: 14274653 Queue name: PTP Session ID: 3 Committed messages: 434 Uncommitted messages: 0 Receiver ID: 14291939 Queue name: PTP Session ID: 4 Committed messages: 432 Uncommitted messages: 1
Example 8 Displaying an Active Topic List
Command:
stcmsctrlutil -host localhost -port 24055 -topiclist
Response:
Topic List: SeeBeyond.MS.Control Broadcast STCTemporaryTopic.2.1
Example 9 Displaying a Journaled Topic List
Command:
stcmsctrlutil -j -tl
Response:
Number Of Topic(s): 1 Topic List: T0
Example 10 Displaying an Archived Topic List
This example displays the topic list for the archive file that has been extracted to the specified directory.
Command:
stcmsctrlutil -ar archive-file-extract-directory -tl
Response:
Number Of Topic(s): 1 Topic List: T0
Example 11 Displaying Active Topic Status
This example displays the current status of the topic Broadcast.
Command:
stcmsctrlutil -host localhost -port 18007 -topicstat Broadcast
Response:
Topic Name: Broadcast First enqueue time: 05172001:16:30:30 Last enqueue time: 05172001:16:30:42 Number of current subscribers: 0 Number of total subscribers: 2 Message count: 6 Min Sequence Number: 0 Max Sequence Number: 3 Suspended: No
The Suspended entry shows whether topic is suspended and all subscribers stop receiving messages. The status usually is No. After the JMS IQ Manager restarts, all topics show Suspended: No status.
The enqueue times and sequence numbers are described in Enqueued Message Properties.
Example 12 Displaying Archived Topic Status
This example displays information about topic T0, in the archive file that has been extracted to the specified directory.
Command:
stcmsctrlutil -ar archive-file-extract-directory -ts T0
Response:
Topic Name: T0 First sequence number: 0 Last sequence number: 1000 First enqueue time: 09122003:00:14:17 Last enqueue time: 09122003:00:14:00 Number of current subscribers: 0 Number of total subscribers: 0 Message count: 1001 Lowest subscriber sequence: 0 Highest subscriber sequence: 0
Example 13 Displaying Properties of All Subscribers to All Topics
Command:
stcmsctrlutil -host localhost -port 24055 -sublistall
Response:
Number Of Subscriber(s): 4 Subscriber name: NonDurable1 Client ID: Topic name: SeeBeyond.MS.Control Committed sequence: 0 High sequence: 0 Subscriber name: subscriber1 Client ID: Client Topic name: Broadcast Committed sequence: 0 High sequence: 3 Subscriber name: subscriber2 Client ID: Client Topic name: Broadcast Committed sequence: 3 High sequence: 6 Subscriber name: NonDurable2 Client ID: Topic name: STCTemporaryTopic.2.1 Committed sequence: 0 High sequence: 0
Example 14 Displaying Properties of All Subscribers to a Specific Topic
Command:
stcmsctrlutil -host localhost -port 24055 -sublistfortopic STC
Response:
Number Of Subscriber(s): 2 Subscriber name: subscriber1 Client ID: Client Topic name: STC Committed sequence: 0 High sequence: 3 Subscriber name: subscriber2 Client ID: Client Topic name: STC Committed sequence: 3 High sequence: 6
Example 15 Changing Message Contents in a Topic
The following command changes the contents of a message on topic T0.
stcmsctrlutil -ctm T0 182 -p 18007 -msgtype text NEWCONTENTS^Z
Response:
Message: 182 has been changed
The following command displays the revised contents of the message.
stcmsctrlutil.exe -p 18007 -tmessage T0 182 -msgtype text
Response:
NEWCONTENTS
Example 16 Displaying Active Message Properties
This example requests information about a specific message in queue Q0 with sequence number 0.
Command:
stcmsctrlutil -qml Q0 0 1
Response:
Number Of Messages(s): 0
In this example, the message has been consumed. As a result, the information is no longer available from the JMS IQ Manager. You must obtain the information from a journal or an archive.
Example 17 Displaying Journaled Message Properties
This example requests information about a specific message in queue Q0 with sequence number 0 from the journaler. As long as the journal has not expired, the message properties are available for viewing.
Command:
stcmsctrlutil -j -qml Q0 0 1
Response:
Number Of Messages(s): 1 Message[1]: Message.SeqNo=0 Message.Timestamp=1031789647260 Journaler.ExpirationTime=1031809647260 Message.Size=228 Message.JMSProperty.TS=1031789647260 Message.JMSProperty.EX=0 Message.JMSProperty.DM=1 Message.JMSProperty.TY=ASCII Message.JMSProperty.PR=0 Message.JMSProperty.RD=false Message.JMSProperty.MI=ID:377:3b742aa5:950:0a01beee:3d7fdc4f104 Message.UserProperty.JMS_ProducerID=BENCH
Example 18 Displaying Archived Message Properties
This example displays a description of the message with sequence number 1, in topic T0, in the archive file that has been extracted to the specified directory.
Command:
stcmsctrlutil -ar archive-file-extract-directory -tml T0 1 1
Response:
Number Of Messages(s): 1 Message[1]: Message.SeqNo=1 Message.Timestamp=1031789654330 Journaler.ExpirationTime=1031809654330 Message.Size=228 Message.JMSProperty.EX=0 Message.JMSProperty.TS=1031789654330 Message.JMSProperty.DM=1 Message.JMSProperty.TY=ASCII Message.JMSProperty.PR=0 Message.JMSProperty.MI=ID:45c:3b742aa6:950:0a01beee:3d7fdc5614a Message.JMSProperty.RD=false Message.UserProperty.JMS_ProducerID=BENCH
Example 19 Republishing Journaled Messages from Topics
This example republishes five journaled messages from topic T0 starting from message with sequence number 491.
Command:
stcmsctrlutil -j -tmi T0 491 5
Response:
Executed function: IMPORT Importing messages Last imported sequence number = 491 Last imported sequence number = 497
Example 20 Republishing Journaled Messages from Queues
This example republishes five journaled messages from queue T0 starting from message with sequence number 500.
Command:
stcmsctrlutil -j -qmi T0 500 5
Response:
Executed function: IMPORT Importing messages Last imported sequence number = 500 Import failed Import failed on sequence number: 500
Note - This example failed, because no messages exist past sequence number 500.