sc: tune rate limit avoidance for attachment messages
context
- signal rate limits messages with attachments to roughly one every 1.5 sec
- we try to observe this rate limit in signalc by sending a
sequence
of messages spaced by 2 sec intervals - however, b/c message delivery is unpredictable, this does not usually throttle messages in a predictable rate
- with this MR, we will move the the trottling to the signalc layer to try to more predictably avoid triggering the singal rate limit (and thus triggering signalboost to start doing exponential backoff retries, with much slower overall message delivery)
implementation idea
- create a hash map of receive channels (actors?) for each phone number
- implement the actor to handle one message every 1.5 sec
- if
SignalSender#send
ever receives an attachment message, don't send it, but instead put it in the attachment sending queue (send it to the actor), where one message will be processed for sending every 1.5 sec
Edited by aguestuser