diff --git a/src/docbkx/message-publishing.xml b/src/docbkx/message-publishing.xml index b196a066cb..89993ac699 100644 --- a/src/docbkx/message-publishing.xml +++ b/src/docbkx/message-publishing.xml @@ -299,64 +299,70 @@ static class BankingOperationsImpl implements BankingOperations {
- Producing and publishing messages based on schedule + Producing and publishing messages based on a scheduled trigger In the above sections we looked at the Message publishing feature of Spring Integration which constructs and publishes messages as by-products of Method invocations. - However you are still responsible to invoke the method. - With scheduling support added to Spring Framework 3.0 we've added another useful feature to Spring Integration - support for scheduled Message producers/publishers. Scheduling could be based on several triggers. - Currently we support cron, fixed-rate, fixed-delay as well as the custom triggers implemented by you. + However in that case, you are still responsible for invoking the method. + In Spring Integration 2.0 we've added another related useful feature: support for scheduled Message producers/publishers via the new "expression" attribute + on the 'inbound-channel-adapter' element. Scheduling could be based on several triggers, any one of which may be configured on the 'poller' sub-element. + Currently we support cron, fixed-rate, fixed-delay as well as any custom trigger implemented by you. - Support for scheduled producers/publishers is provided via <scheduled-producer> xml element. - Lets look at couple of examples: + As mentioned above, support for scheduled producers/publishers is provided via the <inbound-channel-adapter> xml element. + Let's look at couple of examples: - ]]> + + +]]> - In the above example scheduled producer will be created which will construct the Message with payload being the result of the expression  - defined in payload-expression attribute. Such message will be created and sent every time after a delay specified in the fixed-delay attribute. + In the above example an inbound Channel Adapter will be created which will construct a Message with its payload being the result of the expression  + defined in the expression attribute. Such message will be created and sent every time after the delay specified by the fixed-delay attribute. + + +]]> - ]]> - - This example is very similar to the previous one, except that we are using fixed-rate attribute which will allow us to send messages at the fixed rate. + This example is very similar to the previous one, except that we are using the fixed-rate attribute which will allow us to send messages at a fixed rate (measuring from the start time of each task). - ]]> + + +]]> - This example demonstrates how you can apply Cron trigger specified by cron attribute. + This example demonstrates how you can apply a Cron trigger with a value specified in the cron attribute. - -
-
-]]> + +
+
+]]> - Here you can see that in a way very similar to Message publishing feature we are enriching a newly constructed Message with - extra Message headers which could take scalar values as well as Spring expressions. + Here you can see that in a way very similar to the Message publishing feature we are enriching a newly constructed Message with + extra Message headers which could take scalar values as well as the results of evaluating Spring expressions. - If you need to implement your own custom trigger you can use trigger attribute pointing to any spring configured - bean which implements org.springframework.scheduling.Trigger interface. + If you need to implement your own custom trigger you can use the trigger attribute to provide a reference to any spring configured + bean which implements the org.springframework.scheduling.Trigger interface. - + + + - + ]]>