You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pubsub/spring/README.md
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,27 @@ When the application starts, it will do the following every ten seconds:
16
16
17
17
This sample requires [Java]<
8000
span class="pl-s">(https://www.java.com/en/download/) and [Maven](http://maven.apache.org/) for building the application.
18
18
19
-
1.**Follow the Java development environment set-up instructions in [the documentation](https://cloud.google.com/java/docs/setup).**
19
+
1.**Follow the Java development environment set-up instructions in [the documentation](https://cloud.google.com/java/docs/setup).**
to visit Cloud Platform Console and enable the Google Cloud Pub/Sub API.
24
24
25
-
1. Create a new topic `topic-one` and attach a subscription `sub-one` to it, then do the same for `topic-two` and `sub-two`, via the Cloud Platform Console's
25
+
3. Create a new topic `topic-one` and attach a subscription `sub-one` to it, then do the same for `topic-two` and `sub-two`, via the Cloud Platform Console's
1. Enable application default credentials by running the command `gcloud auth application-default login`.
28
+
4. Enable application default credentials by running the command `gcloud auth application-default login`.
29
+
30
+
5. Run the following Maven or Gradle commands to run `PubSubApplication`:
29
31
30
-
1. Run the following Maven command to run `PubSubApplication`:
31
32
```
32
33
mvn clean spring-boot:run
33
34
```
35
+
36
+
```
37
+
gradle bootRun
38
+
```
39
+
34
40
You should observe an incoming message getting sent to `topic-one`, received from `sub-one`, sent to `topic-two`, and received from `topic-two` in the logged messages:
35
41
```
36
42
2020-08-10 17:29:18.807 INFO 27310 --- [ main] demo.PubSubApplication : Started PubSubApplication in 6.063 seconds (JVM running for 6.393)
0 commit comments