How to implement periodical requests in Mule ESB?
-
26-10-2019 - |
سؤال
I need my Mule application to process periodical requests (for example, my application will send requests to a service every 5 seconds and process responses from this service).
المحلول
There is a Quartz trigger and transport built into Mule ESB. It does exactly what you want, initializing flows at a given interval or CRON expression.
Very comprehensive documentation can be found here.
نصائح أخرى
An alternate solution would be using <poll/>
and configuring frequency attribute in it
Reference :-https://developer.mulesoft.com/docs/display/current/Poll+Reference
example:-
<flow name="test1" doc:name="test1" processingStrategy="synchronous">
<poll frequency="1000" doc:name="Poll">
<set-payload value="Polling started at particular interval !!!" doc:name="Set Payload"/>
</poll>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
لا تنتمي إلى StackOverflow