Skip to content

Commit 798f66c

Browse files
authored
fix(PubSub): Add locational endpoint to SubscribeExactlyOnceDelivery sample (#2101)
1 parent 2073a8a commit 798f66c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pubsub/api/src/subscribe_exactly_once_delivery.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ function subscribe_exactly_once_delivery(
3838
): void {
3939
$pubsub = new PubSubClient([
4040
'projectId' => $projectId,
41+
// use the apiEndpoint option to set a regional endpoint
42+
'apiEndpoint' => 'us-west1-pubsub.googleapis.com:443'
4143
]);
4244

4345
$subscription = $pubsub->subscription($subscriptionId);

0 commit comments

Comments
 (0)