This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TYPE=Book | |
ORDER=11237789723987982 | |
NAME=Lord of the Rings | |
ISBN=1289674278091 | |
ADDRESS=MyHouse, MyTown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="orderProcessingFlow"> | |
<file:inbound-endpoint path="/tmp/demo"/> | |
<enricher target="#[variable:OrderType]" source="regex:TYPE=(\w+)\n(?:\n|.)+?"> | |
<echo-component/> | |
</enricher> | |
<choice> | |
<when expression="#[variable:OrderType = Book]"> | |
<logger level="INFO" message="BOOK: #[payload]"/> | |
</when> | |
<when expression="#[variable:OrderType = CD]"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="catchExceptionStrategyExample"> | |
<http:inbound-endpoint host="somehost.com" port="8080" path="service"/> | |
<component class="org.my.Component1"/> | |
<component class="org.my.Component2"/> | |
<catch-exception-strategy> | |
<component class="org.my.ExceptionHandlingComponent"/> | |
</catch-exception-strategy> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<message-filter name="messageFilter" onUnaccepted="DeadLetterQueueFlow" > | |
<expression-filter evaluator="xpath" expression="/order/@type = 'electronics'"> | |
</message-filter> | |
<expression-filter name="filter" evaluator="xpath" expression="/order/@type = 'book'"> | |
<flow name="flowWithFilter"> | |
<jms:inbound-endpoint queue="inQueue"/> | |
<processor ref="messageFilter"/> | |
<filter ref="filter"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="flowWithFilter"> | |
<jms:inbound-endpoint queue="inQueue"/> | |
<message-filter onUnaccepted="DeadLetterQueueFlow" throwOnUnaccepted="false"> | |
<expression-filter evaluator="xpath" expression="/order/@type = 'book'"> | |
</message-filter> | |
<jms:outbound-endpoint queue="outQueue"/> | |
</flow> | |
<flow name="DeadLetterQueueFlow"> | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<http:inbound-endpoint name="in" host="localhost" port="8080> | |
<expression-filter evaluator="header" expression="myHeader = 'true'"/> | |
</http:inbound-endpoint> | |
<flow name="flowWithFilter2"> | |
<inbound-endpoint ref="in"/> | |
<component class="org.my.CustomClass"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="flowWithFilter"> | |
<jms:inbound-endpoint queue="inQueue"/> | |
<expression-filter evaluator="xpath" expression="/order/@type = 'book'"> | |
<jms:outbound-endpoint queue="outQueue"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<spring-bean id="springBeanProcessor" class="org.my.CustomProcessor"/> | |
<custom-transformer name="globalProcessor" class="org.my.CustomProcessor"> | |
<spring:property key="foo" value="bar"/> | |
</custom-transformer> | |
<flow name="flowUsingCustomProcessors"/> | |
<inbound-endpoint address="..."/> | |
<processor ref="springBeanProcessor"/> | |
<processor ref="globalProcessor"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<spring-bean id="springBeanTransformer" class="org.my.CustomTransformer"/> | |
<custom-transformer name="globalTransformer" class="org.my.CustomTransformer"> | |
<spring:property key="foo" value="bar"/> | |
</custom-transformer> | |
<flow name="flowUsingCustomTransformers"/> | |
<inbound-endpoint address="..."/> | |
<transformer ref="springBeanTransformer"/> | |
<transformer ref="globalTransformer"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="choiceFlow2"> | |
<description> | |
Flow that shows the use of the choice element for selective message processing | |
</description> | |
<http:inbound-endpoint host="localhost" port="8080"/> | |
<choice> | |
<when expression="payload=='foo'" evaluator="groovy"> | |
<append-string-transformer message=" Hello foo" /> | |
</when> | |
<when expression="payload=='bar'" evaluator="groovy"> |