WSO2 How to set VFS to a scheduled task

余生长醉 提交于 2019-12-08 04:16:26

问题


In wso2, VFS running default 5 minutes. I think this is bad for performance. I want VFS running when server is not busy. For example, maybe at 02:00 no body request, then VFS can work. I tried add scheduled task, but it no use. Anyone can tell me how to do this? Thank you very much.


回答1:


I think your question is related to WSO2 How to set scheduled task? and https://stackoverflow.com/questions/10537190/how-to-vfs-service-exposed-as-a-web-service questions. Seems you want to do the VFS polling on a particular time of the day (scheduled to a non-peak time) or via a web service. But unfortunately I don't think it's possible to plug a CRON expression or a service call to VFS, because of how VFS transport has been implemented. Anyway you can suggest this as a feature request at WSO2 JIRA




回答2:


What you are suggesting can lead to starvation. If the ESB server is continuously hit with requests, the VFS task will never run. As mentioned in the ESB documentation you can adjust the polling interval by specifying the transport.PollInterval parameter. An example of increasing the polling interval to 30 minutes can look like this in the ESB configuration:

      <parameter name="transport.PollInterval">1800000</parameter>


来源:https://stackoverflow.com/questions/10585778/wso2-how-to-set-vfs-to-a-scheduled-task

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!