Skip to content

Commit f8473fe

Browse files
authored
---
yaml --- r: 5751 b: refs/heads/master c: 6b47486 h: refs/heads/master i: 5749: 23ac77e 5747: b2c30be 5743: 460e067
1 parent 00eb41e commit f8473fe

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3ef9858619552a6b820bfe8f2e16d5b97645f552
2+
refs/heads/master: 6b47486281ca9d151c1a82c8c25b756244111213
33
refs/heads/travis: dae77e558b884bc1b165155482d76c8e40b0fca4
44
refs/heads/gh-pages: 3c5e576ef43acaafb4d9c2c093fad59827a77ffa
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/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)