components-contrib icon indicating copy to clipboard operation
components-contrib copied to clipboard

Add bulk subscribe support to Azure Service Bus

Open shubham1172 opened this issue 1 year ago • 2 comments

Description

This PR allows bulk subscribe capabilities in Azure Service Bus.

Continuing this PR from https://github.com/dapr/components-contrib/pull/2099

New metadata added -

  • MaxBulkSubCount: Maximum number of messages to fetch at once from the broker. If lesser messages are available, it will still fetch them without waiting to complete MaxBulkSubCount.

Issue reference

Please reference the issue this PR will close: #2098

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 / Created issue in the https://github.com/dapr/docs/ repo: https://github.com/dapr/docs/issues/2813

shubham1172 avatar Sep 20 '22 16:09 shubham1172

FYI, @ItalyPaleAle your reviews from the old PR has been addressed here, thanks for reviewing!

shubham1172 avatar Sep 20 '22 18:09 shubham1172

Fix linter issues

pubsub/azure/servicebus/servicebus.go:427     gofumpt     File is not `gofumpt`-ed
pubsub/azure/servicebus/message_test.go:42:2  gosec       G101: Potential hardcoded credentials
pubsub/azure/servicebus/message_test.go:46:2  stylecheck  ST1003: var testSampleTimeHttpFormat should be testSampleTimeHTTPFormat

berndverst avatar Sep 20 '22 19:09 berndverst

Codecov Report

Merging #2100 (92c0211) into feature/pubsub-batching (b298b65) will decrease coverage by 0.22%. The diff coverage is 17.22%.

@@                     Coverage Diff                     @@
##           feature/pubsub-batching    #2100      +/-   ##
===========================================================
- Coverage                    38.08%   37.85%   -0.23%     
===========================================================
  Files                          195      196       +1     
  Lines                        24508    24883     +375     
===========================================================
+ Hits                          9333     9419      +86     
- Misses                       14394    14680     +286     
- Partials                       781      784       +3     
Impacted Files Coverage Δ
...indings/azure/servicebusqueues/servicebusqueues.go 2.35% <0.00%> (-0.06%) :arrow_down:
internal/component/kafka/consumer.go 0.00% <0.00%> (ø)
metadata/utils.go 33.82% <ø> (ø)
pubsub/azure/servicebus/servicebus.go 20.95% <0.00%> (-2.75%) :arrow_down:
...nternal/component/azure/servicebus/subscription.go 8.62% <18.51%> (ø)
pubsub/azure/servicebus/message.go 64.15% <56.75%> (+28.93%) :arrow_up:
state/in-memory/in_memory.go 46.00% <0.00%> (+3.42%) :arrow_up:

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 Sep 23 '22 05:09 codecov[bot]

/ok-to-test

https://github.com/dapr/components-contrib/actions/runs/3114322772 https://github.com/dapr/components-contrib/actions/runs/3114322785

ItalyPaleAle avatar Sep 23 '22 16:09 ItalyPaleAle