-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add samples for RetryPolicy and filtering #1029
Comments
no any progress? |
@feywind any progress here? Tried to make it work with
|
@josedonizetti @sagimonza (from #974) I was able to get this working with the current v2.5.0 release. Gist demoing it both at sub ... I do get the error Jose mentions if I try to run it against the emulator however (have to comment out Interestingly, the emulator acts as if it supports setting the retryPolicy on |
It is quite frustrating that it seems you can't use almost any of the keys in |
does anyone know, how to set a filter for a subscription using this sdk? any docs?? |
For example filter: [ |
It seems the issues with
I've attempted to use different variations, such as snake-casing, to coerce it:
This avoids the INVALID_ARGUMENT error, however no combination that I've tried seems to take any affect on the actual Topic in GCP. UPDATE: So it appears that somewhere along the line, the update mask value of 'messageStoragePolicy' is being converted to 'messageStoragepolicy' - where did that lower-case p come from??? when I debug into call-stream.sendMessageWithContext, I can see the serialised message still contains the valid upper-case P:
It's not clear to me at what point this is becoming a lower-case p. |
Is there somewhere we can raise issues on the emulator? |
On the theory that the emulator is part of the cloud sdk, I reported https://issuetracker.google.com/issues/165694293. It at least received an acknowledgement, though it's 50/50 to me whether that ack was actually from a human, or just a well written bot/template. |
Taking a look at some old issues in here, a few comments:
|
@feywind Any updates on the samples? |
Looking through some issues, it seems like it would look like this:
|
@feywind & @anguillanneuf Just a heads up, the just-merged PR that closed this issue did not fully address the issue. The PR only added samples for subscriptions with filtering—not for subscriptions with a retry policy. |
@WesCossick You are right. The sample is going to be published here: https://cloud.google.com/pubsub/docs/filtering#creating_subscriptions_with_filters. It doesn't have anything to do with RetryPolicy. It's unrelated. |
@WesCossick I thought I'd commented here, sorry - at the moment we don't have a tag for the docs for a subscription retry policy sample, but I'm okay leaving this open to track that. |
@anguillanneuf pointed me at this: https://cloud.google.com/pubsub/docs/admin#pubsub_update_push_configuration-nodejs which is also this: https://github.com/googleapis/nodejs-pubsub/blob/main/samples/modifyPushConfig.js You should be able to do a similar thing by calling |
@feywind is right. @WesCossick, are you able to modify that sample to update |
@feywind (Maybe you already have, but) can we verify if this is true? #974 (comment) We don't need to publish a docs sample but we can include some code snippets as part of the library reference. For examples: |
This is what I'm using to create a subscription with metadata such as retry policy in NodeJS: https://gist.github.com/greensopinion/ce5ebc6a8d76d2978634a089ead082b6 |
@greensopinion Thanks for the gist. I think we're going to add a sample for this after all. There was some debate about whether the sample browser site was for any sample or only for ones in the doc pages. |
googleapis#1029) * fix: do not cancel stream after server returned ok or cancelled status * remove comment * lint * lint
🤖 I have created a release *beep* *boop* --- ### [3.9.4](googleapis/nodejs-bigtable@v3.9.3...v3.9.4) (2022-03-16) ### Bug Fixes * do not cancel stream after server returned ok or cancelled status ([googleapis#1029](googleapis/nodejs-bigtable#1029)) ([33754a2](googleapis/nodejs-bigtable@33754a2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This is in response to these two issues:
#974
#976
It looks like the support is in for us to do this, but some samples could go a long way toward making it accessible.
The text was updated successfully, but these errors were encountered: