Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document thread starvation scenario workaround. #11142

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

amanda-tarafa
Copy link
Contributor

Towards #11092

Copy link
Collaborator

@jskeet jskeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reduce this PR to just the second commit for now, and then consider the first commit separately?

@@ -82,76 +82,6 @@ restart listening for messages with `StartAsync(...)` again. Due to the expense
instance, it is recommended that a singleton client per topic is used for the lifetime of the
application.

## Dependency Injection
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this - the AddSubscriberClient and AddPublisherClient methods do have slightly different overloads to the pure-GAPIC ones. I suspect we don't need as much detail as we currently have, but I think some is important - including the aspects about automatic stopping.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, OK, I'll split this PR in two and reinstate some of the Pub/Sub specific docs.

@@ -101,6 +101,28 @@ builder.Services
.AddExampleClient();
```

#### Dependency injection in high-load-at-startup environments.

If your application uses Application Default Credentials while running in a Google runtime (Compute,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compute Engine instead of just Compute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes done.

builder.Services
.AddRazorPages()
.AddExampleClient();
// Workarounf for possible thread starvation scenario.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workarounf => Workaround

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor Author

@amanda-tarafa amanda-tarafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this PR to be only about the library wide changes in docs.

@@ -82,76 +82,6 @@ restart listening for messages with `StartAsync(...)` again. Due to the expense
instance, it is recommended that a singleton client per topic is used for the lifetime of the
application.

## Dependency Injection
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, OK, I'll split this PR in two and reinstate some of the Pub/Sub specific docs.

@@ -101,6 +101,28 @@ builder.Services
.AddExampleClient();
```

#### Dependency injection in high-load-at-startup environments.

If your application uses Application Default Credentials while running in a Google runtime (Compute,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes done.

builder.Services
.AddRazorPages()
.AddExampleClient();
// Workarounf for possible thread starvation scenario.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@amanda-tarafa amanda-tarafa merged commit a97e4d2 into googleapis:main Oct 5, 2023
8 checks passed
@amanda-tarafa amanda-tarafa deleted the di-docs branch October 5, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants