-
Notifications
You must be signed in to change notification settings - Fork 34
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
Java SDK for CDE CloudEvents #110
Comments
@salaboy As discussed over slack, we can discuss the design approach to create Java SDK for cdevents here. To start with,
Please let me know if we can discuss further on Java SDK for cdevents. |
Nice! I would recommend using https://github.com/cloudevents/sdk-java Since the SDK will be hosted in the cdevents org, I think we should track this work there. We already have similar issues for python and golang sdks there |
@rjalander as suggested by @afrittoli I would just create a project that depends on https://github.com/cloudevents/sdk-java and define the CD Events classed so we can easily construct CD events |
For example I would like to see that we have the right ENUMs in java to for example define the types in this builder:
|
Thank you for your inputs @afrittoli @salaboy As per my understanding, now we need to create a java client alone that can emit different types of events (as per cdevents vocabulary) by using the CloudEventBuilder above. |
@salaboy I tried constructing the event using CloudEventBuilder and did POST from new java project to event-broker (Launched sockeye locally as event broker), could see the events passed to Sockeye dashboard. Used cloudevents-core cloudevents-http-basic as dependency modules from cloudevents/sdk-java
If this approach is good, I could parameterize class to send different types of cdevents from CLI? |
@rjalander can you create a PR with the project so I can take a look? https://github.com/cdfoundation/sig-events/blob/main/cde/sdk/go/pkg/cdf/events/event_types.go Then.. each type of event is defining a set of extensions like this: https://github.com/cdfoundation/sig-events/blob/main/cde/sdk/go/pkg/cdf/events/event_types.go#L112 I am not sure if this is what the SIG wants to change.. but I would start by having the same as we have in the Go SDK until we make other definitions. @afrittoli if we already have some of those definitions.. can you share them? To summarize, what I think will be first good steps:
|
@rjalander @salaboy I created a new repo for the Java SDK: https://github.com/cdevents/sdk-java I created a team and invited you both so you can push to the repo. @rjalander you should see an invite to the org as well. In CDEvents we won't be adding all CDEvents fields in CloudEvents extensions. |
+1 |
@salaboy @afrittoli Created a PR with the initial changes - cdevents/sdk-java#1 |
I created cdevents/spec#46 so we have this issue in the same org as the python and golang ones. If you prefer to keep this open it's ok for me, else I'd would close it in favour of the new one. |
@afrittoli Sure we can close this issue. |
Closing this issue inline with the discussion above |
Create an extension for the CloudEvents Java SDK that provides CD Events definitions and types:
https://github.com/cloudevents/sdk-java
This SDK can follow different approaches, by using just the Java SDK or the Spring integration.
We should have basic coverage for events defined in the vocabulary and at least an example app producing and consuming these events.
The text was updated successfully, but these errors were encountered: