If the DB producer tries to delete a set of messages and it fails for some reason (e.g. deadlock), there is no retry logic; it just fails out. This means another producer can pick it up and will send it again.
We should add retries while deleting messages (up to 5? Infinite? Only on lock wait timeout errors?) to increase the likelihood that the messages don't get sent more than once.
If the DB producer tries to delete a set of messages and it fails for some reason (e.g. deadlock), there is no retry logic; it just fails out. This means another producer can pick it up and will send it again.
We should add retries while deleting messages (up to 5? Infinite? Only on lock wait timeout errors?) to increase the likelihood that the messages don't get sent more than once.