Batch delete - Handle messages that raise exceptions

The batch delete now deletes the already handled messages even if a message in the current batch raises an exception.