流程启动后春季集成获取SQL数据

发布于 2025-01-23 05:59:14 字数 169 浏览 3 评论 0原文

具有对JMS队列进行轮询的集成流,并使用来自消息数据的字段启动选择查询,然后将结果分开以进行进一步处理。

如何使用Java DSL在流中途运行选择查询?使用JDBCOUTBOUNDGATEWAWAY尝试,并且期望poller对象。

谢谢

Have an integration flow which polls a JMS queue and for each message, using a field from the message data need to fire a SELECT query and then split the results from it for further processing.

How do I run a SELECT query in the mid of the flow using Java DSL? Tried with JdbcOutboundGateway and it is expecting the Poller object.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2025-01-30 05:59:14

JDBCoutBoundGateway是解决任务的正确方法。它不需要投票程序。那是将其称为jdbcoutboundgateway的端点。仅仅因为输入频道是queuechannel在您的情况下。不确定为什么在JMS队列之后需要一个队列...

春季集成模型就是这样:

channel -> endpoint (poller) -> message handler (-> channel)

括号中的任何内容是可选的,并且分别取决于通道和消息处理程序的实现。

The JdbcOutboundGateway is the correct way to solve your task. It does not require the poller. That's endpoint which is going to call this JdbcOutboundGateway expects the poller. Just because the input channel is a QueueChannel in your case. Not sure why would one need a queue just after a JMS queue...

Spring Integration model is like this:

channel -> endpoint (poller) -> message handler (-> channel)

Whatever is in the parentheses ч is optional and depend on the channel and message handler implementation, respectively.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文