Spring Integration ftp Thread进程 [英] Spring Integration ftp Thread process

查看:119
本文介绍了Spring Integration ftp Thread进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个已经使用线程运行的bpmn进程,还使用了正在运行Task Scheduler线程的spring ftp,但是我发现应用程序无法从线程切换.有没有什么方法可以在不中断的情况下调用任务计划程序进程,我正在使用InboundchannelAdapter从FTP复制文件.请提出解决该问题的可行方法.

I am using an bpmn process which is already running using thread and also using spring ftp where the Task scheduler thread is running but I found the application is cannot switch from the threads. Is there any way to invoke the task-scheduler process without any interrupt and I am using InboundchannelAdapter to copy files from FTP. Please suggest any feasible way to resolve the issue.

推荐答案

我在您的问题中没有看到任何问题.说实话,目前尚不清楚.

I don't see any issues in your question. And to be honest it fully isn't clear.

请更加具体,有时共享一些代码/配置/日志/堆栈跟踪非常有用.更多信息,更多机会获得快速,正确的答案.

Please, be more specific and sharing some code/config/logs/stack-trace sometime is really useful. More info, more chance to get quick and proper answer.

我想您的问题是您从FTP下载文件并在同一线程中运行BPM进程,该进程可能最终阻止最终等待某些actor动作.

I guess your problem that you download files from FTP and in the same thread run a BPM process which might block eventually waiting for some actor action.

为此,您应该将<poller>上的Spring Integration流转移到其他线程,并且不要窃取任务调度程序资源.对于整个系统来说,它们真的是如此昂贵.考虑为<poller>上的task-executor引用使用足够大的ThreadPoolTaskExecutor.还有一个ExecutorChannel具有类似的线程转换功能.

Fro this purpose you should shift Spring Integration flow on the <poller> to different thread and don't steal task-scheduler resources. They are really so expensive for the whole system. Consider to use enough big ThreadPoolTaskExecutor for the task-executor reference on the <poller>. Also there is an ExecutorChannel for you with similar thread shifting capabilities.

这篇关于Spring Integration ftp Thread进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆