Recommendations
- Set up a local database to store:
- Received messages and their processing status
- Settings cache
- Message status events to be sent to the API
- Event reporting should first save events into the local database and then process the events queue until no unsent messages remain. On error, pause (for example, for 1 minute) and then try again.
- Run the actual messaging as a separate job that takes communication channel bandwidth constraints into account.