This tool eases debugging Google Clouds Pub/Sub with a simple UI.
Features include:

Following environment variables may be set:
| Variable | Usage | Default value |
|---|---|---|
GOPUBSUB_CONFIG | Config file path | config.yaml (within /go/src/app/ in Docker image) |
GOPUBSUB_PORT | Listening HTTP port | 8080 |
GOPUBSUB_MAX_MESSAGES | Only keep last n messages per topic | 10 |
GOOGLE_APPLICATION_CREDENTIALS | Path to JSON credentials file | none |
PUBSUB_EMULATOR_HOST | Host of emulator (see below) | none |
GOOGLE_CLOUD_PROJECT | Default project name | default-project |
config.yaml fileTo get GoPubSub working, you'll need to create config.yaml file with your topics and subscriptions info:
topics:
-
name: my-topic
project: my-gcp-project
subscription: my-subscription
-
name: my-other-topic
project: other-gcp-project
subscription: my-other-subscription
payloads:
-
name: hello
payload: |
{"hello": "world"}
-
name: hello-again
payload: |
{"hello": "world again"}
-
name: my-last-topic
Note that all non-existant topic or subscription will be created. If no subscription is given for a topic, it will be created as sub-<topic-name>.
Download latest release for your OS from the releases page, or run:
go get -u github.com/clickandmortar/gopubsub
Then:
export GOPUBSUB_CONFIG="/path/to/config.yaml"
# To use local emulator
export PUBSUB_EMULATOR_HOST=localhost:8085
# To use actual Pub/Sub service
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/application_default_credentials.json"
gopubsub
And open http://localhost:8080.
docker pull clickandmortar/gopubsub
docker run -d \
-v $(pwd)/config.yaml:/go/src/app/config.yaml \
-p 8080:8080 \
--name="gopubsub" \
-e PUBSUB_EMULATOR_HOST=pubsub:8085 \
clickandmortar/gopubsub
docker-compose up -d
go run main.go
make
Linux and macOS (Darwin) binaries will be available under the bin/ directory.
make docker
This app is heavily inspired by Google's sample.
Content type
Image
Digest
Size
33.5 MB
Last updated
about 6 years ago
docker pull clickandmortar/gopubsub