sdk-go
sdk-go copied to clipboard
Pubsub receiver sample with incomplete command to publish msg
On the pubsub receiver sample, the instruction on how to publish the msg is missing the attributes. Without setting a few attribute arg. Without attributes, the code will fail with the following:
"failed to convert Message to Event: unknown Message encoding"
I recommend updating this line with something like the following:
gcloud pubsub topics publish demo_cloudevents --message='{"Hello": "world"}' --attribute=Content-Type="ap
plication/json",ce-specversion="1.0",ce-id="123",ce-type="example.type",ce-source="example/uri"