Currently when a user add a new bookmark, we check if it exists in the DB already, and if it does, we don't add it to the message queue for processing. However, when the status of the bookmark is pending, we could be dealing with one of two situations:
- the bookmark is currently in the queue and will be processed.
- the bookmark was not processed successfully for some reason and will never leave the pending state.
This is currently being handled by deleting the record from the DB when the processing fails, but this doesn't take into account cases where the processing only fails temporarily. It would be better to configure the queue to retry a certain number of time and then send to a dead letter queue if it continues to fail. Then it can be deleted from the database only when it reaches the dead letter queue.
Currently when a user add a new bookmark, we check if it exists in the DB already, and if it does, we don't add it to the message queue for processing. However, when the status of the bookmark is pending, we could be dealing with one of two situations:
This is currently being handled by deleting the record from the DB when the processing fails, but this doesn't take into account cases where the processing only fails temporarily. It would be better to configure the queue to retry a certain number of time and then send to a dead letter queue if it continues to fail. Then it can be deleted from the database only when it reaches the dead letter queue.