Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support batched CloudEvent content mode in dispatcher #4409

Closed
antoineco opened this issue Oct 27, 2020 · 5 comments
Closed

Support batched CloudEvent content mode in dispatcher #4409

antoineco opened this issue Oct 27, 2020 · 5 comments

Comments

@antoineco
Copy link
Contributor

Problem

Sending a batch of CloudEvents with datacontenttype: application/cloudevents-batch+json results in the creation of a single CloudEvent - composed of an aggregation of multiple CloudEvents serialized as a JSON document - instead of individual CloudEvents.

Persona:: Event producer

Exit Criteria

Dispatchers accept batched CloudEvents (example of payload used in a real application) and know how to split their contents into individual events.

Time Estimate (optional): ?

Additional context (optional)

@antoineco
Copy link
Contributor Author

It's been raised in #2880 already but this issue hasn't seen much activity.

I think part of the job could be delegated to the CloudEvents SDK, where a Message with a batch content type could be split by calling e.g. batchMessage.Events(), but I haven't seen any support for batch events in the SDK. cc. @slinkydeveloper @n3wscott

@slinkydeveloper
Copy link
Contributor

Hi @antoineco, the sdk doesn't have batch support, we never came out with a proper interface definition and, most important, with how to model the behaviours of the client around an incoming batch. Look at cloudevents/sdk-go#301 for more details

@slinkydeveloper
Copy link
Contributor

We're also now looking at implementing the new Websockets protocol binding, which solves similar issues of batched CloudEvent but it's more efficient cloudevents/sdk-go#598

@antoineco
Copy link
Contributor Author

Sounds good! 🙏

I'll close this issue then, and people who use the search and stumble upon it can refer to your links to track support for batching.

@lionelvillard
Copy link
Member

@aslom @dug @cr22rc any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants