Skip to content

Create a CloudEvent type into azcore, for use with messaging SDKs #20970

Closed
@richardpark-msft

Description

@richardpark-msft

The CloudEvent type is used heavily in the upcoming EventGrid SDK for Go, with potential future integration into other messaging SDKs like webpubsub, azeventhubs, and azservicebus.

The basic type is pretty simple:

type CloudEvent struct {
  Data any               // JSON serializable data

  ID *string

  // defaults to "1.0" (TODO: unsure if empty string is considered a valid version)
  SpecVersion *string
}

The ID and SpecVersion fields will get default values

Some other bits I need to flesh out:

  1. CloudEvent has a concept of 'extensions', which allow you to plug in properties that are serialized at the root of the object.
  2. The actual model type has a property called data_base64, but the libraries all hide it. It's used internally for transport, but not exposed to the user directly.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Event Griddesign-discussionAn area of design currently under discussion and open to team and community feedback.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions