Node: Increase subscription buffer size from 32 to 1024 (#3185)

This commit is contained in:
Ben Guidarelli 2023-07-11 13:55:50 -04:00 committed by GitHub
parent 83c5893283
commit 2d9af4d018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -248,7 +248,9 @@ func Run(
return fmt.Errorf("failed to join topic: %w", err)
}
sub, err := th.Subscribe()
// Increase the buffer size to prevent failed delivery
// to slower subscribers
sub, err := th.Subscribe(pubsub.WithBufferSize(1024))
if err != nil {
return fmt.Errorf("failed to subscribe topic: %w", err)
}