Try OpenEdge Now
skip to main content
Messaging and ESB
Implementing Messaging : Managing connections and sessions : Message selectors
 

Message selectors

SonicMQ messages can be filtered so that only messages meeting a specific criteria will be received. Message consumers in both domains can apply message selectors to filter messages. Message selectors filter messages so a client does not receive all the messages. Message selectors evaluate message header fields and properties. They do not access the body of a message.
The default behavior of message selector filtering is:
*For PTP sessions, the filtering is always performed by the SonicMQ Broker
*For Pub/Sub sessions, all messages for a subscribed topic are by default delivered to the subscriber, then the filter is applied by the SonicMQ client to decide which messages to consume
To have the SonicMQ Broker perform the filtering for a Pub/Sub session, use the setSelectorAtBrokerprocedure and getSelectorAtBrokerfunction. Choosing to perform message selection at the SonicMQ Broker reduces message traffic between the broker and the client but increases the workload of the SonicMQ Broker.
Note: Server-based message selectors are available with all adapters.