Skip to content

Commit 5d9f89b

Browse files
authored
---
yaml --- r: 8131 b: refs/heads/tswast-patch-1 c: 6b47486 h: refs/heads/master i: 8129: 5339e78 8127: 4715f43
1 parent ad997d1 commit 5d9f89b

2 files changed

Lines changed: 42 additions & 42 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 3ef9858619552a6b820bfe8f2e16d5b97645f552
60+
refs/heads/tswast-patch-1: 6b47486281ca9d151c1a82c8c25b756244111213
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This client supports the following Google Cloud Platform services at a [GA](#ver
2020
This client supports the following Google Cloud Platform services at a [Beta](#versioning) quality level:
2121

2222
- [BigQuery](#google-cloud-bigquery-beta) (Beta)
23+
- [Cloud Pub/Sub](#google-cloud-pubsub-beta) (Beta)
2324
- [Cloud Spanner](#cloud-spanner-beta) (Beta)
2425
- [Cloud Translation](#google-translation-beta) (Beta)
2526
- [Cloud Natural Language](#google-cloud-language-beta) (Beta)
@@ -31,7 +32,6 @@ This client supports the following Google Cloud Platform services at an [Alpha](
3132
- [Cloud DNS](#google-cloud-dns-alpha) (Alpha)
3233
- [Stackdriver Error Reporting](#stackdriver-error-reporting-alpha) (Alpha)
3334
- [Stackdriver Monitoring](#stackdriver-monitoring-alpha) (Alpha)
34-
- [Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha)
3535
- [Cloud Resource Manager](#google-cloud-resource-manager-alpha) (Alpha)
3636
- [Cloud Speech](#google-cloud-speech-alpha) (Alpha)
3737
- [Cloud Trace](#google-cloud-trace-alpha) (Alpha)
@@ -411,6 +411,45 @@ if (loadJob.getStatus().getError() != null) {
411411
}
412412
```
413413
414+
Google Cloud Pub/Sub (Beta)
415+
----------------------
416+
- [API Documentation][pubsub-api]
417+
- [Official Documentation][cloud-pubsub-docs]
418+
419+
#### Preview
420+
421+
Here is a code snippet showing a simple usage example from within Compute Engine/App Engine
422+
Flexible. Note that you must [supply credentials](#authentication) and a project ID if running this
423+
snippet elsewhere. Complete source code can be found at
424+
[CreateTopicAndPublishMessages.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/CreateTopicAndPublishMessages.java).
425+
426+
```java
427+
import com.google.api.gax.core.ApiFuture;
428+
import com.google.cloud.pubsub.v1.Publisher;
429+
import com.google.cloud.pubsub.v1.TopicAdminClient;
430+
import com.google.protobuf.ByteString;
431+
import com.google.pubsub.v1.PubsubMessage;
432+
import com.google.pubsub.v1.TopicName;
433+
434+
TopicName topic = TopicName.create("test-project", "test-topic");
435+
try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
436+
topicAdminClient.createTopic(topic);
437+
}
438+
439+
Publisher publisher = null;
440+
try {
441+
publisher = Publisher.newBuilder(topic).build();
442+
ByteString data = ByteString.copyFromUtf8("my message");
443+
PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build();
444+
ApiFuture<String> messageId = publisher.publish(pubsubMessage);
445+
System.out.println("published with message ID: " + messageId.get());
446+
} finally {
447+
if (publisher != null) {
448+
publisher.shutdown();
449+
}
450+
}
451+
```
452+
414453
Cloud Spanner (Beta)
415454
--------------------
416455
@@ -648,45 +687,6 @@ Note that you must [supply credentials](#authentication) and a project ID if run
648687
}
649688
```
650689
651-
Google Cloud Pub/Sub (Alpha)
652-
----------------------
653-
- [API Documentation][pubsub-api]
654-
- [Official Documentation][cloud-pubsub-docs]
655-
656-
#### Preview
657-
658-
Here is a code snippet showing a simple usage example from within Compute Engine/App Engine
659-
Flexible. Note that you must [supply credentials](#authentication) and a project ID if running this
660-
snippet elsewhere. Complete source code can be found at
661-
[CreateTopicAndPublishMessages.java](./google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/CreateTopicAndPublishMessages.java).
662-
663-
```java
664-
import com.google.api.gax.core.ApiFuture;
665-
import com.google.cloud.pubsub.spi.v1.Publisher;
666-
import com.google.cloud.pubsub.spi.v1.TopicAdminClient;
667-
import com.google.protobuf.ByteString;
668-
import com.google.pubsub.v1.PubsubMessage;
669-
import com.google.pubsub.v1.TopicName;
670-
671-
TopicName topic = TopicName.create("test-project", "test-topic");
672-
try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
673-
topicAdminClient.createTopic(topic);
674-
}
675-
676-
Publisher publisher = null;
677-
try {
678-
publisher = Publisher.newBuilder(topic).build();
679-
ByteString data = ByteString.copyFromUtf8("my message");
680-
PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build();
681-
ApiFuture<String> messageId = publisher.publish(pubsubMessage);
682-
System.out.println("published with message ID: " + messageId.get());
683-
} finally {
684-
if (publisher != null) {
685-
publisher.shutdown();
686-
}
687-
}
688-
```
689-
690690
Google Cloud Resource Manager (Alpha)
691691
----------------------
692692
@@ -843,7 +843,7 @@ Java 7 or above is required for using this client.
843843
Supported Platforms
844844
-------------------
845845
846-
This client is supported on Mac OS X, Windows and Linux (excluding Android and Alpine).
846+
This client is supported on Mac OS X, Windows and Linux (excluding Android and Alpine).
847847
Google Cloud Platform environments currently supported include GCE, GKE and GAE Flex.
848848
GAE Standard is not currently supported.
849849

0 commit comments

Comments
 (0)