我们有一个出站过滤路由器,如:
<filtering-router>
<jms:outbound-endpoint queue="blah"
connector-ref="blah"
transformer-refs="BasePayloadToMsgEnvelope ObjectToJMSMessage">
<ee:multi-transaction action="ALWAYS_JOIN"/>
</jms:outbound-endpoint>
<and-filter>
<payload-type-filter expectedType="com.my.type"/>
<expression-filter expression="payload.thingy.equals('31')"
evaluator="groovy" />
</and-filter>
</filtering-router>
但我想说的是:
<filtering-router>
<jms:outbound-endpoint queue="blah"
connector-ref="blah"
transformer-refs="BasePayloadToMsgEnvelope ObjectToJMSMessage">
<ee:multi-transaction action="ALWAYS_JOIN"/>
</jms:outbound-endpoint>
<and-filter>
<payload-type-filter expectedType="com.my.type"/> OR <payload-type-filter expectedType="com.my.othertype"/>
<expression-filter expression="payload.thingy.equals('31')"
evaluator="groovy" />
</and-filter>
</filtering-router>
这可能吗?我认为这可以使用具有有效负载类型的表达式求值程序,但我无法找到这样做的示例。
答案 0 :(得分:0)
怎么样:
<and-filter>
<or-filter>
<payload-type-filter expectedType="com.my.type"/>
<payload-type-filter expectedType="com.my.othertype"/>
</or-filter>
<expression-filter expression="payload.thingy.equals('31')"
evaluator="groovy" />
</and-filter>