- Install google cloud sdk
- Authenticate your google cloud installtion by running:
gcloud auth login
- Create a new project and configure gcloud to use it
gcloud projects create {PROJECT_ID}
gcloud config set project {PROJECT_ID}
- Create a new pub/sub topic
gcloud pubsub topics create test-pub-sub-metric
- Publish some messages by running command many time:
gcloud pubsub topics publish test-pub-sub-metrics --message hello
- Generate application defalut credentinal for google client library to connect to your GCP project
gcloud auth application-default login
- Run your gradle project
- Cleanup: Delete the GCP project that we just created after experimenting!