Structure of a Selector
A message selector is made up of one or more boolean expressions, joined together by logical operators and grouped using parentheses. For example:
(<expression1> OR <expression2> AND <expression3>) OR (<expression4> AND NOT <expression5>) ...
A message selector is evaluated
left to right in precedence order. So in this example,
expression2
is evaluated followed by
expression3
(since AND
has
higher precedence than OR
), and if they evaluate
to false
, expression1
is
evaluated, etc.
Expressions are made up of literal values, identifiers (referring to either message headers or properties), conditional operators, and arithmetic operators.
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.