Recommendations
- Setup a local database to store:
- Received messages and their processing status
- Settings cache
- Events to be send to API with sending status
- Any event reporting should at first do save events into the local database then process events queue until no unsent messages remains. On error do pause (for example on 1 minute) then try again.
- Do the actual messaging as a separate job that takes into account communication channels bandwidth constraints.