Quick question: When I pull message from pubsub subscription via command line tool
gcloud beta pubsub subscriptions pull MY_SUB
I am getting a table with (all details and) data as string (already decoded) But i want to use it so i did:
gcloud beta pubsub subscriptions pull MY_SUB --format=json
Than i receive a json with (all details) but the data is encoded.
There is a way to get it parsed with formatting?
Example of publishing message:
gcloud beta pubsub topics publish myTopic "Topic Message" --attribute=Ai=A,Bee=B
NO-FORMATTING_RETURN
─────────────┬─────────────────┬────────────────┬─────────────────────────
──────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────┐
│ DATA │ MESSAGE_ID │ ATTRIBUTES │
ACK_ID
│
├─────────────┼─────────────────┼────────────────┼────────────────────────
──────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────┤
│ Topic Message │ 122122177601805 │ Ai=A Bee=B │ ACK_ID... │
└─────────────┴─────────────────┴────────────────┴────────────────────────
──────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────┘
FORMATTING
[
{
"ackId": "ACK_ID..",
"message": {
"attributes": {
"Ai": "A",
"Bee": "B"
},
"data": "SGVsbG8gVG9waWM=",
"messageId": "122121955409996",
"publishTime": "2017-05-11T10:26:54.143Z"
}
}
]