pubsub-dead-letter-log
psdll
is the CLI tool to list/re-publish pubsub dead-letter log.
What's pubsub dead-letter log?
pubsub dead-letter log is the fail log for publishing the pubsub message.
name |
type |
description |
message |
Message |
pubsub message |
message.data |
string (base64 encoded) |
data of the pubsub message |
message.attributes |
map[string]string |
attributes of the pubsub message |
project |
string |
project ID for Google Cloud Platform |
topic |
string |
topic name for Google Cloud Pub/Sub |
publisher |
string |
application name publishing the message |
pod_name |
string |
pod name which publisher application running |
timestamp |
string (ISO8601) |
timestamp which the message published |
error |
string |
error information |
How to use
Installing
macOS
brew install wantedly/tap/psdll
You can download prebuilt binaries for each platform in the releases page.
build from source
go get -u github.com/wantedly/psdll/cmd/psdll
List logs
$ psdll list s3://wantedly-pubsub-dead-letter-log/dev-project
+--------------------------------------------------------------------------------+-------------------------------+-------------+---------+----------------------------------------+
| PATH | TIMESTAMP | PROJECT | TOPIC | ATTRIBUTES |
+--------------------------------------------------------------------------------+-------------------------------+-------------+---------+----------------------------------------+
| dev-project/awesome/2019/6/19/160059-106086fc-8ff6-4303-aef7-f9e99252d690.json | 2019-06-19 16:00:59 +0900 JST | dev-project | awesome | published_at=2019-06-19T16:00:56+09:00 |
+--------------------------------------------------------------------------------+-------------------------------+-------------+---------+----------------------------------------+
Re-publish logs
$ psdll publish s3://wantedly-pubsub-dead-letter-log/dev-project --project=foo --topic=bar --attribute=retry_count=1
published: id=643425616190931, attributes=map[published_at:2019-06-19T16:00:56+09:00 retry_count:1]