简体   繁体   English

Spring集成:JDBC入站通道适配器

[英]Spring Integration: JDBC inbound channel adapter

I was trying to use JDBC inbound channel adapter and I encountered some confusions. 我试图使用JDBC入站通道适配器,但遇到了一些混乱。

First, which one is more efficient to use: specifying max-rows-per-poll or using limit on query statement? 首先,使用哪个更有效:指定max-rows-per-poll或对查询语句使用limit Second, to avoid the duplicate readings, is there anyway to run poller instead of fixed-rate after last message of each poll is processed? 其次,为避免重复的读数,在处理每个轮询的最后一条消息之后,是否仍要运行轮询器而不是fixed-rate I could use update but there is dynamic update query down the stream. 我可以使用update但是在下游有动态更新查询。

My integration flow is somewhat like jdbc:inbound-channel-adapter -> http:outbound-channel-adapter -> jdbc:outbound-channel-adapter (update each row as per response from http:outbound-channel-adapter ). 我的集成流程有点像jdbc:inbound-channel-adapter -> http:outbound-channel-adapter -> jdbc:outbound-channel-adapter (根据来自http:outbound-channel-adapter响应更新每一行)。 It should handle huge number of rows. 它应该处理大量的行。

  1. LIMIT is more efficient. LIMIT更有效。
  2. As long as you use DirectChannel s (the default), and no task executor on the poller, the next poll won't run until the current one completes, regardless of the trigger. 只要使用DirectChannel (默认设置),并且轮询程序上没有任务执行程序,下一次轮询就不会运行,直到当前的轮询完成为止,而与触发器无关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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