I've stumbled on a problem while publishing events with a custom CloudEvent wrapper.
I'm trying to use custom CloudEvent so that I can specify the type property and use it for routing functionality inside subscribers.
Related to Allow publishing cloud events directly #868
The project is using docker-compose to set up the whole infrastructure (pub/sub services, dapr sidecars, Kafka, etc) for testing.
Demo project based on Dapr and Dapr.AspNetCore ver. 1.8, and .Net 5 (Web Api)
Expected Behavior
Published cloud event JSON schema should look like events published without custom cloud events.
Actual Behavior
Dapr sidecar log shows the following warning/error:
level=warning msg="retriable error returned from app while processing pub/sub event <nil>, topic: RoutingIntegrationEvent, body: {\"type\":\"https://tools.ietf.org/html/rfc7231#section-6.5.13\",\"title\":\"Unsupported Media Type\",\"status\":415,\"traceId\":\"00-9c97aa770091eb243c1f904fbd88c27f-cfe48e0d27c8fc42-01\"}. status code returned: 415" app_id=subscriber instance=b398cfe88dc9 scope=dapr.runtime type=log ver=1.8.0
After comparing published events with and without a custom CE wrapper I've noticed that the "data" property is different between those two types of events.
Specifically, pure event serializes cloud event with "data" property, while custom CE serializes it into uppercase "Data" property.
Intro
I've stumbled on a problem while publishing events with a custom CloudEvent wrapper. I'm trying to use custom CloudEvent so that I can specify the type property and use it for routing functionality inside subscribers.
Related to Allow publishing cloud events directly #868 The project is using docker-compose to set up the whole infrastructure (pub/sub services, dapr sidecars, Kafka, etc) for testing. Demo project based on Dapr and Dapr.AspNetCore ver. 1.8, and .Net 5 (Web Api)
Expected Behavior
Published cloud event JSON schema should look like events published without custom cloud events.
Actual Behavior
Dapr sidecar log shows the following warning/error:
level=warning msg="retriable error returned from app while processing pub/sub event <nil>, topic: RoutingIntegrationEvent, body: {\"type\":\"https://tools.ietf.org/html/rfc7231#section-6.5.13\",\"title\":\"Unsupported Media Type\",\"status\":415,\"traceId\":\"00-9c97aa770091eb243c1f904fbd88c27f-cfe48e0d27c8fc42-01\"}. status code returned: 415" app_id=subscriber instance=b398cfe88dc9 scope=dapr.runtime type=log ver=1.8.0
After comparing published events with and without a custom CE wrapper I've noticed that the "data" property is different between those two types of events. Specifically, pure event serializes cloud event with "data" property, while custom CE serializes it into uppercase "Data" property.
Steps to Reproduce the Problem
Fix
Adding.Data property, inside Dapr.Client project.
[JsonPropertyName("data")]
attribute to CloudEventRelease Note
FIX Bug in runtime.