Content Matchers
A content matcher filters the inbound stream of messages for a subscriber.
Content matchers operate during the match phase of message delivery (but see Subscriber Interest).
A subscriber can have at most one content matcher. A subscriber without a content matcher distributes all inbound messages to its event queue: it does not filter out any messages. In contrast, a subscriber with a content matcher distributes only the messages that match it.
An inbox subscriber cannot have a content matcher. An inbox subscriber always receives all the messages sent to its inbox.
Each content matcher has a match string, which defines its filtering action. The match string specifies a set of field names paired with corresponding values. The match string matches a message if and only if every field specification in the match string correctly matches the presence, absence, or value of a corresponding field in the message (see Match Semantics).
- Match String Syntax
Construct match strings on this syntactic template in JSON format. - Match Semantics
Content matchers interpret match strings using these simple rules. - Content Matcher Performance and Architecture
For best performance, match against no more than 10 fields. (Fewer is faster.) - Subscriber Interest
Whenever possible, publishers send messages only to interested subscribers. That is, publishers send only those messages that match at least one subscriber content matcher. This behavior can reduce bandwidth consumption, and can enhance subscriber performance in some situations.