-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle not retriable error cases (#48)
This handles errors returning `:not_retriable` - If it's `:message_too_large` and we only sent one message, we log the message and drop it from the queue - If it's `:message_too_large` and we sent multiple messages, we drop down the max request size and retry. This results in smaller batches until we only send one message, which is handled above. Hard set smallest batch size of 500,000 bytes. - If it's any other `not_retriable` erro, we log the batch we tried to send, drop the head of the queue, and retry. This also adds code to ensure we always send at least one message if the queue has messages. This will prevent having a large message on the queue above the batch size preventing sending.
- Loading branch information
Showing
2 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters