Skip to content

Subscriber streams should not be retried after permanent error #4848

@dbolduc

Description

@dbolduc

If a stream ends in a permanent error, and the application continues to call stream.next(), we will continue to retry the stream.

Our library is more predictable if it returns a single error, then None for any subsequent calls to stream.next().

Applications should be able to write code like this where the loop does not continuously error:

while let Some(r) = stream.next().await {
  match (r) {
    Err(_) => println!("D'oh, forgot to gcloud auth application-default login"); // for example
    Ok(m) => { ... }
  }
}

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions