Missing fields in CloudEvent deserialisation
See original GitHub issueRaising this on behalf of a colleague who is on vacation
I have started using DAPR pub/sub and am creating a Subscription in a Springboot application, so I am using the JAVA sdk.
The subscriber receives the messages correctly, but I noticed that the CloudEvent class, used to deserialize the incoming event, is missing these fields tracid
,traceparent
,tracestate
,topic
,pubsubname
.
I’m using these libraries
implementation 'io.dapr:dapr-sdk:1.5.0'
implementation 'io.dapr:dapr-sdk-actors:1.5.0'
implementation 'io.dapr:dapr-sdk-springboot:1.5.0'
I know that the last version is 1.6.0, but from the javadoc I saw that the CloudEvent class of that version miss the fields too.
cc @fvitolo
Issue Analytics
- State:
- Created a year ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Deserialization fails when subject is null · Issue #430 - GitHub
We now have a problem, where a service uses cloudevents-json-jackson and gets a valid CloudEvent, but which does have the field subject set ......
Read more >Batch Consumer not working with Kafka for CloudEvents ...
If I use any custom class with custom serializer/deserializer it is working fine but with cloudevents the messages are not coming.
Read more >cloudevents.exceptions.MissingRequiredFields Example
Learn how to use python api cloudevents.exceptions. ... MissingRequiredFields): # CloudEvent constructor throws TypeError if missing required field # and ...
Read more >Use CloudEvents v1.0 schema with Event Grid - Microsoft Learn
This schema allows for uniform tooling, standard ways of routing and handling events, and universal ways of deserializing the outer event schema ...
Read more >Persisting Cloud Events to Cosmos DB in Azure
CloudEvents.CloudEvent'. Path: $ | LineNumber: 0 | BytePositionInLine: 1. ---> System.NotSupportedException: Deserialization of types without a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The mapper is not configured to ignore unknown attributes:
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
Now, the fix here is to serialize the “unknown” attributes into a dictionary since it is not possible to hardcode every possible attribute in cloud event since the spec allows it to be extensible.
Makes sense.