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.
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.