Consultor Eletrônico



Kbase P124885: How to implement the message selector in a 4GL JMS Client?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/30/2007
Status: Unverified

GOAL:

How to implement the message selector in a 4GL JMS Client?

GOAL:

What is the syntax for setting the message selector in a 4GL JMS Client?

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
Sonic MQ 6.1
Sonic MQ 7.x
All Supported Operating Systems

FIX:

When setting the message selector value within the 4GL application for both the receiveFromQueue procedure for a PTP session and subscribe procedure for a PUB/SUB session, enclose the message selector query within double quotes. The examples below show how to do so for the receiveFromQueue and subscribe procedures respectively.
/* Receiving from a Queue. */
RUN receiveFromQueue IN ptpsession (
"SampleQ1", /* name of queue */
"PrimaryOrganization='Default Organization' and JMSPriority <> 4", /* Message selector */
consumerH). /* Handles incoming messages*/
/* Subscribing to a topic. */
RUN subscribe IN pubsubsession (
"SampleQ1", /* name of topic */
?, /* Subscription is not durable */
"PrimaryOrganization='Default Organization' and JMSPriority <> 4", /* Message selector */
no, /* Want my own messages too */
consumerH). /* Handles the incoming messages*/