Skip to content

Commit 012c1e3

Browse files
remove migrated samples and update readme (GoogleCloudPlatform#3177)
1 parent d9c6d76 commit 012c1e3

File tree

7 files changed

+1
-558
lines changed

7 files changed

+1
-558
lines changed

pubsub/cloud-client/README.md

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,3 @@
11
# Getting Started with Cloud Pub/Sub and the Google Cloud Client libraries
22

3-
<a href="https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/README.md">
4-
<img alt="Open in Cloud Shell" src ="http://gstatic.com/cloudssh/images/open-btn.png"></a>
5-
6-
[Google Cloud Pub/Sub][pubsub] is a fully-managed real-time messaging service that allows you to
7-
send and receive messages between independent applications.
8-
This sample Java application demonstrates how to access the Pub/Sub API using
9-
the [Google Cloud Client Library for Java][google-cloud-java].
10-
11-
[pubsub]: https://cloud.google.com/pubsub/
12-
[google-cloud-java]: https://github.com/GoogleCloudPlatform/google-cloud-java
13-
14-
For more samples, see the samples in
15-
[google-cloud-java](https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub).
16-
17-
## Quickstart
18-
19-
#### Setup
20-
- Install [Maven](http://maven.apache.org/).
21-
- [Enable](https://console.cloud.google.com/apis/api/pubsub.googleapis.com/overview) Pub/Sub API.
22-
- Set up [authentication](https://cloud.google.com/docs/authentication/getting-started).
23-
24-
#### Build
25-
- Build your project with:
26-
```
27-
mvn clean package -DskipTests
28-
```
29-
30-
#### Create a new topic
31-
```
32-
mvn exec:java -Dexec.mainClass=com.example.pubsub.CreateTopicExample -Dexec.args=my-topic
33-
```
34-
35-
#### Create a subscription
36-
```
37-
mvn exec:java -Dexec.mainClass=com.example.pubsub.CreatePullSubscriptionExample -Dexec.args="my-topic my-sub"
38-
```
39-
40-
#### Publish messages
41-
```
42-
mvn exec:java -Dexec.mainClass=com.example.pubsub.PublisherExample -Dexec.args="my-topic 5"
43-
```
44-
Publishes 5 messages to the topic `my-topic`.
45-
46-
#### Receive messages
47-
```
48-
mvn exec:java -Dexec.mainClass=com.example.pubsub.SubscriberExample -Dexec.args=my-sub
49-
```
50-
Subscriber will continue to listen on the topic and print out message id and data as messages are received. Press `Ctrl+C` to exit the application.
51-
52-
#### Testing
53-
Run the test with Maven.
54-
```
55-
mvn verify
56-
```
3+
The samples have been moved to live alongside the Java client library for Cloud Pub/Sub: https://github.com/googleapis/java-pubsub/tree/master/samples/snippets/src/main/java/pubsub/

pubsub/cloud-client/pom.xml

Lines changed: 0 additions & 92 deletions
This file was deleted.

pubsub/cloud-client/src/main/java/com/example/pubsub/CreatePullSubscriptionExample.java

Lines changed: 0 additions & 68 deletions
This file was deleted.

pubsub/cloud-client/src/main/java/com/example/pubsub/CreateTopicExample.java

Lines changed: 0 additions & 55 deletions
This file was deleted.

pubsub/cloud-client/src/main/java/com/example/pubsub/PublisherExample.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)