Handle service bus exported errors
Description
Currently this component expects a wrapped amqpError typed error, but an unwrapped exported typed error can be returned. The exported error includes amqp errors but will not be found by unwrapping. We will check for the "connlost" error code instead for retries. https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azservicebus/error.go
error publishing event unto orders topic: rpc error: code = Internal desc = error when publish to topic orders in pubsub orderpubsub: (connlost): link detached, reason: *Error{Condition: amqp:resource-limit-exceeded, Description: The maximum entity size has been reached or exceeded for Topic: 'AAJ8779:TOPIC:ORDERS'. Size of entity in bytes:1073785042, Max entity size in bytes: 1073741824. For more information please see https://aka.ms/ServiceBusExceptions . QuotaType: EntitySize Reference:1ebebe4c-f8ca-43ca-9f50-4ff8d4b4bf30, TrackingId:003257460000082908a6559d62f1993c_G22_B10, SystemTracker:aaj8779:Topic:orders, Timestamp:2022-08-08T23:16:13, Info: map[]}
Issue reference
#1899
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
- [x] Code compiles correctly
- [ ] Created/updated tests
- [ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
Codecov Report
Merging #1942 (c704ae2) into master (d30b773) will increase coverage by
0.02%. The diff coverage is0.00%.
@@ Coverage Diff @@
## master #1942 +/- ##
==========================================
+ Coverage 37.37% 37.40% +0.02%
==========================================
Files 191 191
Lines 23824 23830 +6
==========================================
+ Hits 8904 8913 +9
+ Misses 14158 14154 -4
- Partials 762 763 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| pubsub/azure/servicebus/servicebus.go | 25.16% <0.00%> (-0.34%) |
:arrow_down: |
| 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.
Thanks, this is very good. Does this need to be implemented in the binding too?
@addjuarez please address comment from @ItalyPaleAle
From looking at the servicebus queues binding, it looks like we do not have the same retry logic for publishing. So, I don't think we need to add this change in the binding currently unless we want to add retries in the binding. https://github.com/dapr/components-contrib/blob/master/bindings/azure/servicebusqueues/servicebusqueues.go#L139
Ok perfect :)