简体   繁体   中英

Is there a way to use WSO2 to make REST API call every minutes?

I am trying to use WSO2 to schedule pooling data call every minutes to a REST API my business has and push that information to our centralize MQTT broker.

I've been reading the documents of the Streaming Integrator, Micro Integrator, Micro Gateway and API Manager and I cannot find any way to schedule REST API calls base on a defined time.

The point of this task is to push data from all our system into our centralize broker and add analyzing tool afterward to benefit from the data created by our systems that is only accessible by the system at this time.

Could someone give me a hint on what should be the right tools for this and maybe the link to some documentation about how to configure time base call if the software wso2 allowed it ?

You can create a WSO2EIscheduled task

You can define a cron job expression for timing and execute a sequence or an implementation class.

example:

<task name="SampleInjectToSequenceTask"
         class="org.apache.synapse.startup.tasks.MessageInjector"
         group="synapse.simple.quartz">
      <trigger interval="5"/>
 
      <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
 
                name="injectTo"
                value="sequence"/>
  
      <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
 
                name="sequenceName"
                value="SampleSequence"/>
 
   </task>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM