Skip to content

Add dead letter topic support#929

Merged
halspang merged 1 commit into
dapr:masterfrom
yash-nisar:dlt_test
Aug 22, 2022
Merged

Add dead letter topic support#929
halspang merged 1 commit into
dapr:masterfrom
yash-nisar:dlt_test

Conversation

@yash-nisar
Copy link
Copy Markdown
Contributor

Closes #897

Signed-off-by: Yash Nisar yashnisar@microsoft.com

Description

Add support for dead letter topic for the dotnet sdk

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #897

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation: Will do once I get approvals on the PR design

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 15, 2022

Codecov Report

Merging #929 (d3eaeaf) into master (c8a2ade) will decrease coverage by 0.17%.
The diff coverage is 54.16%.

❗ Current head d3eaeaf differs from pull request most recent head 400347c. Consider uploading reports for the commit 400347c to get more accurate results

@@            Coverage Diff             @@
##           master     #929      +/-   ##
==========================================
- Coverage   69.87%   69.70%   -0.18%     
==========================================
  Files         154      155       +1     
  Lines        5079     5119      +40     
  Branches      549      553       +4     
==========================================
+ Hits         3549     3568      +19     
- Misses       1399     1420      +21     
  Partials      131      131              
Flag Coverage Δ
net5 69.66% <54.16%> (-0.18%) ⬇️
net6 69.60% <54.16%> (-0.20%) ⬇️
netcoreapp3.1 69.66% <54.16%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...NetCore/DaprEndpointConventionBuilderExtensions.cs 38.46% <0.00%> (-44.88%) ⬇️
src/Dapr.AspNetCore/TopicOptions.cs 0.00% <0.00%> (ø)
...r.AspNetCore/DaprEndpointRouteBuilderExtensions.cs 93.10% <100.00%> (+0.37%) ⬆️
src/Dapr.AspNetCore/Subscription.cs 91.66% <100.00%> (+0.75%) ⬆️
src/Dapr.AspNetCore/TopicAttribute.cs 82.14% <100.00%> (+4.36%) ⬆️
src/Dapr.Client/DaprClientGrpc.cs 86.88% <0.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we aren't using the debugger? Also, this line implies that we're getting the deposit from StdIn or something, but I don't think that's the case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 93 to 103
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these duplicates to the attributes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized this was in the RoutingSample and not the ControllerSample. Nevermind.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were there no changes needed for the program that runs the example? Or updates to the README that explains it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll probably add a small section to test the dead letter topic by providing a negative amount to be deposited/withdrawn

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're adding the attribute as metadata to the builder?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have some extra space at the end of this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread src/Dapr.AspNetCore/TopicOptions.cs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check, this is copied from dapr/dapr, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Comment on lines 33 to 34
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't required unless you want to use it in your test.

Copy link
Copy Markdown
Contributor Author

@yash-nisar yash-nisar Aug 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add it because I had added DeadLetterTopic to ITopicMetadata. Fixed since I added a new interface for dead letter topic metadata.

Comment thread test/Dapr.AspNetCore.IntegrationTest/SubscribeEndpointTest.cs Outdated
Comment thread test/Dapr.AspNetCore.IntegrationTest/SubscribeEndpointTest.cs Outdated
Copy link
Copy Markdown
Contributor

@halspang halspang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor feedback and you're good to go.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still be using the logger.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread src/Dapr.AspNetCore/TopicOptions.cs Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, first comment should end in a ..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Closes dapr#897

Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
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 this pull request may close these issues.

Support the DeadLetter Topic of pubsub

2 participants