How to avoid data loss when Target Database is offline

Hi,

My target service inserts data in Oracle database. The data base will be down for 4 hrs, but the source application will continue sending data. Can you tell me how can i get my data queued up so that once the target database is up the data reaches the database.

I think a good solution will be the broker retry (throw exception for retry logic). but with a incresing interval. Configure the intreval on the trigger to let’s say 1 second, and use in your flow a delay/sleep step. Based on the retryCount you can increase the interval every time.

Example:
RetryCount = 1 - sleep 1 second
RetryCount = 2 - sleep 10 seconds
RetryCount = 3 - sleep 100 seconds
RetryCount = 4 - sleep 1000 seconds
RetryCount = 5 - sleep 10000 seconds, etc.

this way you have retry logic for small network hick ups, but also for long db down times. But only do this if you do not have too much load.

Other solution is to store the data on the file system, and start processing messages from there when the db is up.

probably there are may threads on this forum about this.

Hi Rob,

U mean we have to build the logic in a flow service(trigger service) with the sleep interval?
Do we need to set any property in the trigger for setting the interval?
what i understood is:

  1. Once the document is published, Broker sends it to the client who subscribes it.
  2. We write a trigger, that subscribes for the publishable doc and invokes the corresponding trigger service that does the processing logic of the document.
  3. the trigger service is a flow service, that connects to the database for any updations or insertions of the data in the doc to the tables in the Oracle database.
  4. If the databse is down, we have to check for the status of the database and retry for specific no of times. In between the reties to the database, it has to sleep for some time:
    If RetryCount = 1 - sleep 1 second
    RetryCount = 2 - sleep 10 seconds
    RetryCount = 3 - sleep 100 seconds
    RetryCount = 4 - sleep 1000 seconds
    RetryCount = 5 - sleep 10000 seconds…so on

Is this understanding correct?

Also can you help what properties or what services we have to use in making this successful.