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

How to send a batch events? #716

Open
snowwolf007cn opened this issue Sep 3, 2021 · 9 comments
Open

How to send a batch events? #716

snowwolf007cn opened this issue Sep 3, 2021 · 9 comments

Comments

@snowwolf007cn
Copy link

I don't find any example of using the ApplicationCloudEventsBatchJSON format to send a batch event, can anyone provide me an example?

@n3wscott
Copy link
Member

to be honest, I still don't know. I filed cloudevents/spec#414 to try to understand the processing model for the sdk but was not able to get a real answer.

What are you trying to do? maybe it is time to add it.

@snowwolf007cn
Copy link
Author

while we initialize a new customer to our system, we need to sync the data from their system. It'll generator billions of historic operation events. so we need to batch the job and send batch events and broadcast to other internal systems to process the customer initialize the process. Otherwise, other systems have to receive the events one by one, and the downstream have to initialize a lot of connections to handle the request, it'll be a disater.

@embano1
Copy link
Member

embano1 commented Oct 4, 2021

So just to understand this:

  • The SPEC defines the format
  • The SDK currently does not support batching?

@n3wscott
Copy link
Member

The go sdk does not support batching because I don't understand how to support it at the client layer, and the spec does not want to define what the client layer should do. I am in a pickle.

I could make the sdk support creating them but I really don't know what to do on the go-sdk client receive side (from the perspective of the client).

@markmandel
Copy link
Contributor

In case anyone comes looking, just merged:

To allow you to send and receive batched HTTP events via standard http.Request and http.Response objects.

That should help unblock this use case.

@sagikazarmark
Copy link

Is there an issue tracking native support in the client for this?

@duglin
Copy link
Contributor

duglin commented Jun 1, 2023

@sagikazarmark does #829 meet your needs?
@markmandel any reason we need to keep this issue open?

@markmandel
Copy link
Contributor

@markmandel any reason we need to keep this issue open?

The only reason I can come up with to keep this open, is that you would like to have batch support in https://pkg.go.dev/github.com/cloudevents/sdk-go#Client ?

@sagikazarmark
Copy link

That's exactly what I meant above.

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

No branches or pull requests

6 participants