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

[DO NOT MERGE] feat(pubsub): add bulk subscribe support

Open shubham1172 opened this issue 3 years ago • 3 comments

Description

NOTE: This PR should be only merged once the bulk pubsub feature (2218) is checked-in Dapr. The Dapr reference in build/validate YAMLs must be updated back to master.

Add a new annotation @BulkSubscribe to allow subscribing to events using the Bulk Subscribe API.

Issue reference

Please reference the issue this PR will close: #778

Checklist

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

  • [X] Code compiles correctly
  • [X] Created/updated tests
  • [X] Extended the documentation

shubham1172 avatar Sep 28 '22 10:09 shubham1172

@shubham1172 The build failure is due to a diff reason, not related to your PR. I have the fix in this PR - https://github.com/dapr/java-sdk/pull/740

pravinpushkar avatar Sep 29 '22 14:09 pravinpushkar

Do not merge until dapr/mechanical-markdown#29 is merged and tests have been added here. EDIT: The PR is merged and tests have been updated.

shubham1172 avatar Oct 04 '22 03:10 shubham1172

Codecov Report

Merging #791 (58cf265) into master (5a2833c) will increase coverage by 2.30%. The diff coverage is 96.15%.

@@             Coverage Diff              @@
##             master     #791      +/-   ##
============================================
+ Coverage     76.64%   78.95%   +2.30%     
- Complexity     1145     1203      +58     
============================================
  Files           104      109       +5     
  Lines          3627     3696      +69     
  Branches        418      421       +3     
============================================
+ Hits           2780     2918     +138     
+ Misses          639      565      -74     
- Partials        208      213       +5     
Impacted Files Coverage Δ
...va/io/dapr/client/domain/DaprBulkMessageEntry.java 90.00% <90.00%> (ø)
...java/io/dapr/springboot/DaprBeanPostProcessor.java 75.00% <93.33%> (+34.70%) :arrow_up:
.../src/main/java/io/dapr/springboot/DaprRuntime.java 56.52% <100.00%> (+56.52%) :arrow_up:
...ava/io/dapr/client/domain/DaprBulkAppResponse.java 100.00% <100.00%> (ø)
...o/dapr/client/domain/DaprBulkAppResponseEntry.java 100.00% <100.00%> (ø)
.../dapr/client/domain/DaprBulkAppResponseStatus.java 100.00% <100.00%> (ø)
...in/java/io/dapr/client/domain/DaprBulkMessage.java 100.00% <100.00%> (ø)
sdk/src/main/java/io/dapr/utils/Retry.java 75.00% <0.00%> (+25.00%) :arrow_up:
...src/main/java/io/dapr/springboot/DaprTopicKey.java 38.46% <0.00%> (+38.46%) :arrow_up:
... and 3 more

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

codecov[bot] avatar Oct 10 '22 10:10 codecov[bot]

@mukundansundar @pravinpushkar this is ready for review. PS, I have updated the CI to point to master which we can change once 1.10 is released, and the mechanical markdown test is added back since dapr/mechanical-markdown#29 is merged.

shubham1172 avatar Nov 21 '22 10:11 shubham1172

@shubham1172 protos and code should be updated after https://github.com/dapr/dapr/pull/5489 is merged

mukundansundar avatar Nov 30 '22 05:11 mukundansundar

LGTM..however, The PR checks for method Invoke failing.

pravinpushkar avatar Dec 13 '22 05:12 pravinpushkar

LGTM..however, The PR checks for method Invoke failing.

Yes, I need to troubleshoot that - over the top of your head can you share any potential reasons for this failure?

shubham1172 avatar Dec 13 '22 05:12 shubham1172

@shubham1172 One point, potentially BulkPublishEntry in #789 and DaprBulkMessageEntry can be combined. Based on which PR goes in first both domain objects can be combined. Also do we need to prefix with Dapr on the domain objects? Like DaprBulkMessage ? Can it just be BulkMessage?

mukundansundar avatar Jan 13 '23 07:01 mukundansundar

@shubham1172 One point, potentially BulkPublishEntry in #789 and DaprBulkMessageEntry can be combined. Based on which PR goes in first both domain objects can be combined. Also do we need to prefix with Dapr on the domain objects? Like DaprBulkMessage ? Can it just be BulkMessage?

Thanks Mukundan, I have removed the Dapr prefix from domain objects.

shubham1172 avatar Jan 13 '23 08:01 shubham1172

Also, resolve conflicts from master, please.

artursouza avatar Jan 18 '23 03:01 artursouza

Codecov Report

Merging #791 (75111a3) into master (b83661d) will increase coverage by 0.48%. The diff coverage is 54.54%.

@@             Coverage Diff              @@
##             master     #791      +/-   ##
============================================
+ Coverage     77.62%   78.10%   +0.48%     
- Complexity     1161     1190      +29     
============================================
  Files           105      111       +6     
  Lines          3647     3718      +71     
  Branches        419      424       +5     
============================================
+ Hits           2831     2904      +73     
+ Misses          603      597       -6     
- Partials        213      217       +4     
Impacted Files Coverage Δ
...o/dapr/client/domain/BulkSubscribeAppResponse.java 0.00% <0.00%> (ø)
...r/client/domain/BulkSubscribeAppResponseEntry.java 0.00% <0.00%> (ø)
.../client/domain/BulkSubscribeAppResponseStatus.java 0.00% <0.00%> (ø)
...va/io/dapr/client/domain/BulkSubscribeMessage.java 0.00% <0.00%> (ø)
.../dapr/client/domain/BulkSubscribeMessageEntry.java 0.00% <0.00%> (ø)
...java/io/dapr/springboot/DaprTopicSubscription.java 85.00% <75.00%> (+85.00%) :arrow_up:
...java/io/dapr/springboot/DaprBeanPostProcessor.java 72.00% <85.00%> (+31.70%) :arrow_up:
.../src/main/java/io/dapr/springboot/DaprRuntime.java 81.48% <100.00%> (+16.26%) :arrow_up:
...va/io/dapr/springboot/DaprSubscriptionBuilder.java 48.71% <100.00%> (+13.58%) :arrow_up:
...ava/io/dapr/springboot/DaprTopicBulkSubscribe.java 100.00% <100.00%> (ø)
... and 4 more

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

codecov[bot] avatar Jan 18 '23 10:01 codecov[bot]