CloudEvents additional custom data
See original GitHub issueSo, I am talking with cdEvents who use cloudevents as the underlying transport format, and one thing I noticed is that they have an additional field called payload
in their requests.
{
"specversion" : "1.0",
"type" : "com.github.pull_request.opened",
"source" : "https://github.com/cloudevents/spec/pull",
"subject" : "123",
"id" : "A234-1234-1234",
"time" : "2018-04-05T17:31:00Z",
"comexampleextension1" : "value",
"comexampleothervalue" : 5,
"datacontenttype" : "text/xml",
"data" : "<much wow=\"xml\"/>" // Notice the nesting of the data
}
This unfortunately is a breaking change to anyone adhering to this standard, so instead I proposed some alternative solution in cdEvents#40. The basic idea is making data a top level parent, and introducing something like a cd-events-metadata
field in the payload. So instead
<much_wow>
<somefield>hello world!</somefield>
<cloud_events_metadata>
<type>com.github.pull_request.opened</type>
<source>https://github.com/cloudevents/spec/pull</source>
<subject>123</subject>
<time>2018-04-05T17:31:00Z</time>
<comexampleextension1>value</comexampleextension1>
<comexampleothervalue>5</comexampleothervalue>
<id>A234-1234-1234</id>
<spec-version>1.0</spec-version>
</cloud_events_metadata>
</much_wow>
But is this possible with cloudevents? Have you guys thought about something like this?
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
manage custom attributtes · Issue #77 · cloudevents/sdk-java
When I use the function the field data appears two times in the output so that brings me problems parsing the json object....
Read more >CloudEvents - JSON event format | Eventarc - Google Cloud
CloudEvents (cloudevents.io) is a specification for describing event data in a common way. The specification is under the Cloud Native ...
Read more >CloudEvents |
CloudEvents is a specification for describing event data in a common way. CloudEvents seeks to dramatically simplify event declaration and delivery across ...
Read more >JavaScript SDK for CloudEvents
Serialize and deserialize CloudEvents in different event formats. Send and recieve CloudEvents with via different protocol bindings. Note: Supports CloudEvent ...
Read more >Sending and Receiving Cloud Events with Kafka - Quarkus
The data attribute contains the wrapped business event. It is an essential part, and the other attributes are just providing details about that ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@duglin Do you think it would be worth adding some text to the binary mode description to further clarify its purpose?
See: https://github.com/cloudevents/spec/pull/1035