When configuring a database connector, the drop-down list lets you choose between Mule standard and Enterprise JDBC connectors and the Saddle JDBC connector. Let’s have a look at the differences between them.
Inbound
Mule’s JDBC connector is constantly polling the database, at the frequency of your choice. In some use cases, you may not want to poll the database, but instead you’d rather have your JDBC inbound endpoint be triggered, and then stop querying unless you ask to. That’s possible with Saddle’s JDBC connector.
When you configure the query, use {} for parameters that have to be passed to the query by Saddle. This works for outgoing connections as well as for incoming, triggered requests. Saddle will automatically generate templates that match your query and also a request template which can be used to provide parameters for inbound requests. This is covered in much more detail in the database tutorial.
Outbound
With Mule standard JDBC connector, the payload is a Map and one insert statement is executed at a time including a commit in between two inserts. If you use the Saddle JDBC Connector on an outbound endpoint, Saddle will execute all defined write statements at a time and commit after everything has been written, definitely lowering the time needed to handle all the queries.
< Prev | Next > |
---|