<integration:annotation-config/>
<gateway id="publishGateway"
service-interface="com.mypackage.services.SpringIntegratio n.Gateway.LogMessageGateway"/>
<channel id="asyncExecutorChannel">
<dispatcher task-executor="threadPool"/>
</channel>
<task:executor id="threadPool" pool-size="10-20"
queue-capacity="100" rejection-policy="DISCARD" keep-alive="15"/>
<chain input-channel="asyncExecutorChannel">
<header-value-router header-name="messageType">
<mapping value="log" channel="onToJmsChannelQueue" />
<mapping value="exception" channel="discardedMessagesQueue" />
</header-value-router>
</chain>