Skip to content

Commit

Permalink
Merge pull request #695 from xmtp/bwcDvorak-patch-1
Browse files Browse the repository at this point in the history
Update broadcast.md to include a description of the 'backoff' sending method that prioritizes reliability over raw speed.
  • Loading branch information
bwcDvorak authored Mar 22, 2024
2 parents 6bfaf1f + 71d90a4 commit ce77671
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/tutorials/broadcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import TabItem from "@theme/TabItem";
You can send a broadcast message (1:many message or announcement) with XMTP. The recipient sees the message as a DM from the sending wallet address.

1. Use the bulk query `canMessage` method to identify the wallet addresses that are activated on the XMTP network, up to 1k per batch.
2. Send the message to all of the activated wallet addresses.
2. Begin sending messages to the activated wallet addresses.
3. Your sending logic should monitor responses from the XMTP network and respond as follows:
- If you receive a 200 response, send the next message.
- If you receive a 429 response, pause sending for one minute then resume sending starting with the message that triggered the 429.
4. Repeat the loop described in step 3 until all the activated wallet addresses have been messaged.

For example:

Expand Down

0 comments on commit ce77671

Please sign in to comment.