googleapis / java-pubsub

Apache License 2.0
122 stars 88 forks source link

docs(samples): Optimistic subscribe sample #2063

Closed michaelpri10 closed 1 day ago

michaelpri10 commented 3 weeks ago

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

If you write sample code, please follow the samples format.

snippet-bot[bot] commented 3 weeks ago

Here is the summary of changes.

You are about to add 1 region tag. - [samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java:19](https://github.com/michaelpri10/java-pubsub/blob/ad2ea92df30006565206dc50755e900c748d7696/samples/snippets/src/main/java/pubsub/OptimisticSubscribeExample.java#L19), tag `pubsub_optimistic_subscribe`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

michaelpri10 commented 3 weeks ago

/gcbrun

michaelpri10 commented 2 weeks ago

@kamalaboulhosn Quick bump of this PR review when you have the chance. Thanks!

michaelpri10 commented 6 days ago

/gcbrun

michaelpri10 commented 6 days ago

@kamalaboulhosn I've added a small change here to also catch the IllegalStateException and ignore it if the underlying failure is due to a NotFoundException. The exception being thrown was causing the tests to fail.