Oracle9i Application Developer's Guide - Advanced Queuing Release 1 (9.0.1) Part Number A88890-02 |
|
JMS Operational Interface: Basic Operations (Publish-Subscribe), 32 of 37
Create a topic browser for topics with text, stream, objects, bytes, or map messages.
To retrieve messages that have a certain correlationID, the selector for the TopicBrowser can be one of the following:
JMSMessageID = 'ID:23452345
' to retrieve messages that have a specified message ID
JMSPriority < 3 AND JMSCorrelationID = 'Fiction'
color IN ('RED', BLUE', 'GREEN') AND price < 30000
All message IDs must be prefixed with "ID:". Use methods in java.util.Enumeration
to go through a list of messages.
/* Create a browser without a selector */ TopicSession jms_session; TopicBrowser browser; Topic topic; browser = ((AQjmsSession) jms_session).createBrowser(topic, "SUBS1");
/* Create a browser for topics with a specified selector */ TopicSession jms_session; TopicBrowser browser; Topic topic; /* create a Browser to look at messages with correlationID = RUSH */ browser = ((AQjmsSession) jms_session).createBrowser(topic, "SUBS1", "JMSCorrelationID = 'RUSH'");
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|