Skip to content

Commit 0c00f3c

Browse files
committed
Make a note in the watcher bot documentation about retry logic for jetstream connections.
1 parent 9869e65 commit 0c00f3c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/docs/bots/watcherBot.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ As we want to watch for posts we will limit the jetstream to only tell us about
254254
Now that you have your bot detecting posts with your watched words in them you can expand it to flag the post for examination, or even to send a reply to the
255255
post, or whatever else you want to do.
256256

257+
The bot will exit if its connection to the jetstream is interrupted. If you want to add retry logic for your jetstream connection see [retry logic](../jetstream.md#retry)
258+
in [Using the Jetstream](../jetstream.md).
259+
257260
> [!TIP]
258261
> If you want to watch for hash tags, or links to web sites, or mentions you should look at the
259262
`Post`'s [facets](https://docs.bsky.app/docs/advanced-guides/post-richtext), not the post text.

docs/docs/jetstream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ using (var jetStream = new AtProtoJetstream(
109109

110110
You can also change the `CollectionFilter` and `DidFilter` properties on a running instance.
111111

112-
## Retrying connection loss
112+
## <a name="retry">Retrying connection loss</a>
113113

114114
If the underlying WebSocket to the Jetstream is closed by the server (for example, due to the connection dropping), message parsing will stop and exit. If you want
115115
to implement retrying the connection then you can wrap the `ConnectAsync()` / `CloseAsync()` in logic like the following:

0 commit comments

Comments
 (0)