Error Handling by Subscription Service
When Subscription Service inserts data into a database and an error occurs, the Subscriber endpoint rolls back all previous operations on the database to the original status. Subscription Service handles error data in two ways: normal error handling and bulk insert error handling.
Normal Error Handling
Subscription Service handles error data differently depending on different situations.
- If settings of the Bulk Insert Size and Batch Commit Size fields do not take effect, Subscription Service puts error data in either the exception table or opaque exception table.
- If setting of the Bulk Insert Size field does not take effect but setting of the Batch Commit Size field takes effect, Subscription Service puts all cache data in either the exception table or opaque exception table.
- If settings of the Bulk Insert Size and Batch Commit Size fields both take effect, Subscription Service puts all successfully processed data in the destination table and puts the rest in either the exception table or opaque exception table.
Bulk Insert Error Handling
Bulk insert error handling is a new feature that supports bulk insert operations. This feature improves data accuracy and processing efficiency as well as preventing data failure in the bulk insert operation.
- Bulk insert error handling applies to Subscription Service only.
- Bulk insert error handling can be implemented only when the java.sql.BatchUpdateException exception occurs.
- Bulk insert error handling supports the Oracle database only.
- Bulk insert error handling does not support Parent-Child message or Group message.
Without the bulk insert error handling feature, the agent inserts all rows (both correct and incorrect) into the exception table when Subscription Service performs the bulk insert operation.
For example, the agent attempts to perform a bulk insert of 500 rows to the destination table. If the first 300 rows are inserted successfully but the last 200 rows are not, the agent inserts the successful 300 rows into the destination table and the unsuccessful 200 rows into the exception table.
For information about the prerequisites of using bulk insert error handling, see Prerequisites of Using Bulk Insert Error Handling.
For information on how to implement bulk insert error handling, see Working with Bulk Insert Error Handling.