Open artembilan opened 4 years ago
Also see relevant JIRA for complete story: https://jira.spring.io/browse/INT-948
I see a few open questions here:
attributes
natural maps to message headers and data
(plus extensions
?) to payload. Or the CE could be the simply be the payload. In this case the Message headers are independent.I think we need to support both variants:
Message
incoming CE.On the producer side we indeed can support CE as a payload
, but I wonder if all the channel adapters should be fixed for this. Or it would be better just to make end-users to place a CEtoMessageTransformer
(or Converter
) (or serializer since we are going to send byte[]
) before sending CE into the target protocol.
Doesn't look like it worth to chase all the protocol binders since we simply can map a CE instance (or message headers + payload) to an expected CE network structure in one transformer/converter/serializer place.
I'm not familiar with spec versions, but let's implement first of all what is supported by Java SDK!
Thank you for feedback, @dturanski !
I'm not familiar with spec versions, but let's implement first of all what is supported by Java SDK!
That's my point. The Java SDK implements 3 versions, e.g., io.cloudevents.v1.CloudEventImpl
, io.cloudevents.v02.CloudEventImpl
, io.cloudevents.v03.CloudEventImpl
. The only documentation I can find on this is https://github.com/cloudevents/spec which only mentions v1.0
but if we depend on the SDK, all versions are available.
Oh! I see what you mean. So, if it is something new for us, we should rely on the latest version! You should adapt from the old version by yourself. Or we can implement adapters on demand...
Re https://jira.spring.io/browse/INT-948. I'm not sure if CE really helps because the real payload is a member of CE T data
. The consumer and producer still both need to be aware of the type. spring-tuple
, basically a map with type conversion had a similar goals. In any case, I would not standardize on CE for all channel adapters, providing support is OK.
See more info about Java SDK: https://github.com/cloudevents/sdk-java