Skip to content

docs(sample): Update the subscribe with error listener and subscribe with exactly-once samples #2437

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

Merged
merged 3 commits into from
May 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(sample): Add locational endpoint for exactly-once subscriber sample
  • Loading branch information
michaelpri10 committed May 22, 2025
commit d8acb2645826f8e10e610b5ded7ba2668a0ec02e
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ public static void subscribeWithExactlyOnceConsumerWithResponseExample(

Subscriber subscriber = null;
try {
subscriber = Subscriber.newBuilder(subscriptionName, receiverWithResponse).build();
subscriber =
Subscriber.newBuilder(subscriptionName, receiverWithResponse)
.setEndpoint("us-west1-pubsub.googleapis.com:443")
.build();
// Start the subscriber.
subscriber.startAsync().awaitRunning();
System.out.printf("Listening for messages on %s:\n", subscriptionName.toString());
Expand Down