The <channel/> element is now used for creating all Point-to-Point channel types. It accepts a queue sub-element (options are: <queue/>, <priority-queue/>, or <rendezvous-queue/>). If no queue sub-element is provided, the channel type will be a DirectChannel.
This commit is contained in:
@@ -15,18 +15,24 @@
|
||||
<si:channel id="inputOne" />
|
||||
<si:channel id="inputTwo" />
|
||||
|
||||
<si:channel id="outputOne" />
|
||||
<si:channel id="outputTwo" />
|
||||
<si:channel id="outputOne">
|
||||
<si:queue capacity="10"/>
|
||||
</si:channel>
|
||||
<si:channel id="outputTwo">
|
||||
<si:queue capacity="10"/>
|
||||
</si:channel>
|
||||
|
||||
<si:channel id="errorChannel" />
|
||||
<si:channel id="errorChannel">
|
||||
<si:queue capacity="10"/>
|
||||
</si:channel>
|
||||
|
||||
<si-xml:xpath-router id="routerOne"
|
||||
xpath-expression-ref="xpathExpression" />
|
||||
<si:router ref="routerOne" input-channel="inputOne" />
|
||||
<si:router ref="routerOne" input-channel="inputOne" error-handler="errorHandler"/>
|
||||
|
||||
<si-xml:xpath-router id="routerTwo"
|
||||
xpath-expression-ref="xpathExpressionMulti" multi-channel="true" />
|
||||
<si:router ref="routerTwo" input-channel="inputTwo" />
|
||||
<si:router ref="routerTwo" input-channel="inputTwo" error-handler="errorHandler"/>
|
||||
|
||||
|
||||
<bean id="xpathExpression"
|
||||
@@ -39,4 +45,8 @@
|
||||
<property name="expression" value="//name" />
|
||||
</bean>
|
||||
|
||||
<bean id="errorHandler" class="org.springframework.integration.channel.MessagePublishingErrorHandler">
|
||||
<property name="errorChannel" ref="errorChannel"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -80,7 +80,6 @@ public class XPathRouterParserTests extends AbstractJUnit4SpringContextTests{
|
||||
inputOne.send(docMessage);
|
||||
GenericMessage<Document> received = (GenericMessage<Document>) errorChannel.receive(1000);
|
||||
assertNotNull("Did not receive message on errors", received);
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
Reference in New Issue
Block a user