Re: cloudevents-api/2.0.0-milestone1: io.cloudevents.CloudEvent.getData() - lost support for Java object data

Francesco Guardiani

Hi micheal,
Thank you so much for your feedback! I'm the maintainer of sdk-java working on sdk-java v2 and I'm aware of the current limitation. I'm trying to iterate a couple of times on this issue here, in order to create an API we can support and flexible enough:
Feel free to give some feedback about it.


Il giorno lun 20 lug 2020 alle ore 18:08 Furjel, Michal <michal.furjel@...> ha scritto:

Dear java sdk community,


I am an IT developer from Siemens and we recently started to evaluate your cloud event libraries.


I’ve spotted that you have already a milestone version of 2.0.0

I’ve tried to upgrade our code to use the milestone

however unfortunately we are missing quite much having possibility

to store Java object as a data in cloud event.

Our main motivation to have Java object as a data in Cloud event is

that we would like to separate handling of a cloud event as Java object

and handling of a transformation it to json string and byte array representation.

Now with the changes done in the 2.0.0 milestone

we already when building a cloud event have to provide data in byte array now

what (when using 2.0.0 milestone) makes a mixture in the design of the code

having CloudEvent java object with data already serialized

and then later again serialize the complete cloud event.

Wouldn’t it be possible to keep an option to pass java object to cloud event envelope

so we can have complete cloud event in java objects stage and then later to serialize it?


Thank you for any feedback on this.


Kind regards,

Michal Furjel


Francesco Guardiani
Software Engineer @ Red Hat
Computer Science MSc student @ UniMi
IT Engineer BSc @ Polimi

Join to automatically receive all group messages.