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:
pollingFrequency="1000" transactionPerMessage="false">
Next, on the inbound endpoint, configure a <jdbc:transaction> element and set the receiveMessageInTransaction property to true. For example:
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.