dotnet-sdk icon indicating copy to clipboard operation
dotnet-sdk copied to clipboard

Cloudeventsmiddleware has lost other properties of cloudevents

Open saber-wang opened this issue 3 years ago • 9 comments
trafficstars

Describe the proposal

https://github.com/dapr/dotnet-sdk/blob/cc1b097991bbf268464b74935cdfbb35c0a26443/src/Dapr.AspNetCore/CloudEventsMiddleware.cs#L78

Should additional attributes be attached to the request header?

saber-wang avatar Dec 10 '21 01:12 saber-wang

@saber-wang - Thanks for opening this issue! Are you just asking for additional properties to passed through to the subscription endpoint? Is this as opposed to providing them in the body of the message?

halspang avatar Dec 20 '21 17:12 halspang

@halspang I just don't think we should throw away other attributes

saber-wang avatar Dec 21 '21 03:12 saber-wang

@halspang Currently, direct publishing of cloud events is supported #868 . Should this issue be reconsidered?

saber-wang avatar May 21 '22 05:05 saber-wang

@saber-wang - Circling back to this, if the raw cloud events doesn't work, I think it would be due to the runtime not actually passing the extra attributes through. If we want them here, we'd have to take care of it there first.

halspang avatar Jul 20 '22 16:07 halspang

@halspang @saber-wang

I wanted to see if there is any workaround to access those cloud events attributes from request headers. I see that the current middleware does not capture all the attributes from the body and pass them into the header as specified in the their documents.

https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/http-protocol-binding.md#313-metadata-headers

imranmomin avatar Jul 21 '22 19:07 imranmomin

@imranmomin At present, I have rewritten middleware and handled cloudevent properties myself

saber-wang avatar Jul 22 '22 01:07 saber-wang

I guess I will also have to rewrite the middleware

imranmomin avatar Jul 26 '22 01:07 imranmomin