Insert the build ids to a table and remove the ids once processed. If the data service is restarted and the in memory queue is lost, process all the items from the database queue.