Skip to content

Commit

Permalink
samples: add comment to regional endpoint (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
anguillanneuf committed Sep 2, 2020
1 parent 785981a commit f379673
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -47,6 +47,8 @@ public static void publishWithOrderingKeysExample(String projectId, String topic
// Create a publisher and set message ordering to true.
Publisher publisher =
Publisher.newBuilder(topicName)
// Sending messages to the same region ensures they are received in order
// even when multiple publishers are used.
.setEndpoint("us-east1-pubsub.googleapis.com:443")
.setEnableMessageOrdering(true)
.build();
Expand Down

0 comments on commit f379673

Please sign in to comment.