GoogleCloudPlatform / GoogleCloudPlatform/php-docs-samples

Pub/Sub: samples audit and cleanup

Open
#1,185 0 comments 0 reactions 1 assignee Claimed by @jdpedrie View on GitHub
samples type: feature request
Dominant language
PHP
Stars
1k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

In addition to #1178, please also add:

1. `pubsub_enable_subscription_ordering`: [docs](https://cloud.google.com/pubsub/docs/ordering#enabling_message_ordering)
1. `pubsub_list_topic_subscriptions`: [docs](https://cloud.google.com/pubsub/docs/admin#listing_subscriptions), this is different from listing project subscriptions.
1. `pubsub_publisher_concurrency_control`: [docs](https://cloud.google.com/pubsub/docs/publisher#concurrency). This is optional, depending on if concurrency control even makes sense in PHP.
1. `pubsub_publisher_retry_settings`: [docs](https://cloud.google.com/pubsub/docs/publisher#retry)
1. `pubsub_publish_custom_attributes`: [docs](https://cloud.google.com/pubsub/docs/publisher#using_attributes)
1. `pubsub_publish_with_error_handler`: [docs](https://cloud.google.com/pubsub/docs/publisher#publishing_messages). The existing sample doesn't show how to handle publish failures. It's a quickstart publish sample.
1. `pubsub_publish_with_ordering_keys`: [docs](https://cloud.google.com/pubsub/docs/publisher#using_ordering_keys)
1. `pubsub_resume_publish_with_ordering_keys`: [docs](https://cloud.google.com/pubsub/docs/publisher#retry). There are two code includes in this section. Resume publish is towards the end of the section and shows the `resume_publish` method.
1. `pubsub_subscriber_async_pull`: [docs](https://cloud.google.com/pubsub/docs/pull#asynchronous-pull). Does this make sense in PHP?
1. `pubsub_subscriber_async_pull_custom_attributes`: [docs](https://cloud.google.com/pubsub/docs/pull#pull-messages-with-custom-attributes). Does this make sense in PHP?
1. `pubsub_subscriber_error_listener`: [docs](https://cloud.google.com/pubsub/docs/pull#error-listener). This is optional. The Java sample is the best example. Note that this method may not exist in PHP.
1. `pubsub_subscriber_flow_settings`: [docs](https://cloud.google.com/pubsub/docs/pull#config)
1. `pubsub_subscriber_sync_pull_with_lease`: [docs](https://cloud.google.com/pubsub/docs/pull#synchronous_pull_with_lease_management)

Remove:
1. Remove the region tag `pubsub-publish` but keep the other region tag `pubsub_quickstart_publisher` and keep the sample.

The PR to fix this will probably be big. Feel free to break it into logical chunks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.