Risks of Retry Logic
Improper retry mechanisms easily cause duplicate SMS messages, leading to user complaints and triggering blocks by carrier risk control systems.
Handling Based on Failure Type
1. Permanent Failures
- Invalid numbers (e.g., non-existent or malformed): Prohibit all retries.
- Archive the number; do not attempt to send messages to it again.
- Carrier-side temporary outages: Allow a limited number of retries.
- Use an exponential backoff strategy to avoid rapid, high-frequency re-sending.
- Set a reasonable maximum retry limit.
- Implement idempotency controls in the business system to prevent duplicate submissions for the same order ID.
- Base the final delivery result on the actual delivery receipt status, rather than relying solely on the API response.
2. Temporary Failures
3. Key Business Control Points
It is recommended to implement retry logic within the business system rather than relying on the platform's automatic retry mechanisms; this reduces the risk of duplicate messages and channel blocking.
