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

Principles for normal error handling are as follows:
  • If you do not set a bulk insert size, the subscriber adapter inserts error data into either the exceptions table or opaque exceptions table.
  • If you set both a bulk insert size and a batch commit size, the subscriber adapter inserts data in the following ways:
    • If all the data in a bulk is processed successfully, the subscriber adapter inserts all the data in the bulk into the destination table.
    • If not all the data in a bulk is processed successfully, the subscriber adapter inserts all the data, including the error data in the bulk into either the exceptions table or opaque exceptions table.

Bulk Insert Error Handling

Bulk insert error handling is a 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.

Note: The bulk insert error handling feature restrictions are listed as follows:
  • 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 exceptions 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 exceptions 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.