Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Cloud Events from dapr in aspnetcore integration #74

Closed
amanbha opened this issue Oct 7, 2019 · 7 comments · Fixed by #93
Closed

Handle Cloud Events from dapr in aspnetcore integration #74

amanbha opened this issue Oct 7, 2019 · 7 comments · Fixed by #93
Assignees

Comments

@amanbha
Copy link
Contributor

amanbha commented Oct 7, 2019

Dapr sends events for topics in a cloudevent format, aspnetcore integration should handle it.

@rynowak
Copy link
Collaborator

rynowak commented Oct 13, 2019

@yaron2 @amanbha - ignore the previous comment. It looks like dapr is doing something invalid. I'll log a bug.

@yaron2
Copy link
Member

yaron2 commented Oct 13, 2019

Is the cli or runtime doing something invalid?

@rynowak
Copy link
Collaborator

rynowak commented Oct 13, 2019

yeah, runtime, just a sec.

@rynowak
Copy link
Collaborator

rynowak commented Oct 13, 2019

dapr/dapr#574

@rynowak
Copy link
Collaborator

rynowak commented Oct 13, 2019

I'm not blocked by this, I should be able to get a PR going for this work item assuming that's going to be fixed.

@yaron2
Copy link
Member

yaron2 commented Oct 13, 2019

I will issue a fix for this today

@rynowak
Copy link
Collaborator

rynowak commented Oct 13, 2019

cool beans 👍

rynowak added a commit that referenced this issue Oct 13, 2019
Fixes: #74

note: This relies on the fix for dapr/dapr#574 which has been merged.

This change introduces a middleware that can upwrap a *structured* cloud
event. This is the format used by dapr by default now for pub/sub
messaging. Adding the middleware makes it transparent to the developer
whether the data can from a cloud event or was a basic RPC call.

We're adding the middleware for this first since it's the most general
approach. It has a drawback compared with other approaches, performance.

Users could alternatively use the SDK from CloudEvents to read their
data without the middleware.

We might also want to add an MVC formatter in the future, which could do
the unwrapping and deserialization to a user-type in a single operation.
rynowak added a commit that referenced this issue Oct 13, 2019
Fixes: #74

note: This relies on the fix for dapr/dapr#574 which has been merged.

This change introduces a middleware that can upwrap a *structured* cloud
event. This is the format used by dapr by default now for pub/sub
messaging. Adding the middleware makes it transparent to the developer
whether the data can from a cloud event or was a basic RPC call.

We're adding the middleware for this first since it's the most general
approach. It has a drawback compared with other approaches, performance.

Users could alternatively use the SDK from CloudEvents to read their
data without the middleware.

We might also want to add an MVC formatter in the future, which could do
the unwrapping and deserialization to a user-type in a single operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants