Reading Time: 2 minutes

The JDBC transport allows you to poll for messages in a table. However, by default the JDBC inbound endpoint splits the record set into individual MuleMessages, and the outbound endpoint only receives a single row at a time. If you want to select multiple rows at a time and process the rows in a single transaction, you can take the following steps.

First, set the transactionPerMessage property on the <jdbc:connector> element to false. For example:
connector name="jdbcConnector" dataSource-ref="jdbcDataSource1"
pollingFrequency="1000" transactionPerMessage="false">


connector>

Next, on the inbound endpoint, configure a <jdbc:transaction> element and set the receiveMessageInTransaction property to true. For example:
connector-ref="jdbcConnector">

The outbound endpoint will now receive a list of rows from the table. You can save this list to a file, to another table, etc.

latest report
Learn why we are the Leaders in API management and iPaaS