Skip to content

JdbcPollingChannelAdapter Streaming support #3963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
syedyusufh opened this issue Dec 8, 2022 · 2 comments
Open

JdbcPollingChannelAdapter Streaming support #3963

syedyusufh opened this issue Dec 8, 2022 · 2 comments

Comments

@syedyusufh
Copy link

JdbcPollingChannelAdapter used by JdbcOutboundGateway does NOT stream the resultset, whereas returns all the results as a list. This could result in OOM if there are large number of records returned.

Would be better if streaming support is added to JdbcPollingChannelAdapter used by JdbcOutboundGateway

Reference from SO:
https://stackoverflow.com/questions/74729365/spring-integration-jdbc-outboundgateway-returning-1-record-only-even-with-maxrow

@syedyusufh syedyusufh added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Dec 8, 2022
@syedyusufh syedyusufh changed the title Streaming support into a JdbcPollingChannelAdapter JdbcPollingChannelAdapter Streaming support Dec 8, 2022
@artembilan artembilan added in: jdbc and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Dec 8, 2022
@artembilan artembilan added this to the Backlog milestone Dec 8, 2022
@mjd507
Copy link
Contributor

mjd507 commented May 31, 2025

hello @artembilan @syedyusufh

Let me have a try on this issue 😉

Thank you!

@artembilan
Copy link
Member

You may @mjd507 .
I have not done anything here yet because I have doubts how streaming is going to work with transactions and update functionality we have in this adapater.

mjd507 added a commit to mjd507/spring-integration that referenced this issue May 31, 2025
Fixes: spring-projects#3963

Introduce a `queryForStream` variable and a `streamConsumer` function in `JdbcOutboundGateway`. along with the underlying method `JdbcPollingChannelAdapter.doPollForStream`.

when produce reply messages, if in stream mode, gateways always receives a empty list, process logic are moved to `streamConsumer`.

Signed-off-by: Jiandong Ma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants