cloudevents / sdk-go

Go SDK for CloudEvents
https://cloudevents.github.io/sdk-go/
Apache License 2.0
836 stars 221 forks source link

Adding a sample command for mqtt samples #1056

Open Leo6Leo opened 6 months ago

Leo6Leo commented 6 months ago

It is a bit frustrating when I went over the MQTT samples. As there is lack of documentation.

Providing the sample command like the one below would help and save a lot of time.

mosquitto_pub -t 'test-topic' -m '{"specversion" : "1.0","type" :"com.example.someevent","id" : "1234-1234-1234","source" : "/mycontext/subcontext","data":{"msg":"hello world!"}}' -D PUBLISH user-property Content-Type application/cloudevents+json; charset=utf-8

For more context, see the discussion here