0
votes

In our app, we have to employ Spring Integration JDBC Inbound Channel the way it will poll a DB table containing customer orders. We need to process all orders of a single customer in one go.

So we have a table that contains order_number, customer_number, and some additional data. We want to get a collection of rows where customer_number is the same as an argument of the method the inbound channel adapter invokes.

The database underneath is Oracle 19c. Any idea how to achieve this?

1

1 Answers

1
votes

Sounds more like a JdbcOutboundGateway - to call a SELECT based on the argument provided in the message payload.

See more info in docs: https://docs.spring.io/spring-integration/docs/current/reference/html/jdbc.html#jdbc-outbound-gateway.

It already doesn't matter how you start the flow, but definitely a JDBC Inbound Channel Adapter is not going to work for you since there is no something like a request-based selection. You can figure out something via an ExpressionEvaluatingSqlParameterSourceFactory, but it really sounds like an event-driven approach via JdbcOutboundGateway is what you are looking for.