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
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