Based on certain routing conditions the messages are directed to different receivers. Store the condition in any header or property values and call them in router dynamically. Different acceptable formats are below:
In Router configuration, mention the Expression Type: Non-XML
Usage of Operators in Non-XML Conditions
Usage of Operators in Non-XML Conditions
Operator | Example |
---|---|
= | ${header.SenderId} = '1' |
!= | ${header.SenderId} != '1' |
> | ${header.SenderId} > '1' |
>= | ${header.SenderId} >= '1' |
< | ${header.SenderId} < '1' |
<= | ${header.SenderId} <= '1' |
and | ${header.SenderId}= '1' and ${header.ReceiverId} = '2' |
or | ${header.SenderId}= '1' or ${header.ReceiverId}= '2' |
contains | ${header.SenderId} contains '1' |
not contains | ${header.SenderId} not contains '1' |
in | ${header.SenderId} in '1,2' |
not in | ${header.SenderId} not in '1,2' |
regex | ${header.SenderId} regex '1.*' |
not regex | ${header.SenderId} not regex '1.*' |