You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: transports/azure-service-bus/configuration.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ To disable prefetching, prefetch count should be set to zero.
50
50
51
51
> [!NOTE]
52
52
> The lock duration for all prefetched messages starts as soon as they are fetched. To avoid `LockLostException`, ensure the lock-renewal duration is longer than the total time it takes to process all prefetched messages (i.e., message handler execution time multiplied by the prefetch count).
53
-
> In addition, it's important to consider the endpoint's scaling. If the prefetch count is high, the lock may deprive other endpoint instances of messages, rendering additional endpoint instances unnecessary.
53
+
> In addition, it's important to consider how endpoints are scaled. If the prefetch count is high, the lock may deprive other endpoint instances of messages, making those instances redundant.
54
54
55
55
## Lock-renewal
56
56
@@ -61,7 +61,10 @@ To ensure smooth processing, it is recommended to configuring the `MaxAutoLockRe
61
61
partial: lockrenewal
62
62
63
63
> [!NOTE]
64
-
> Message lock renewal is initiated by client code, not the broker. If the request to renew the lock fails after all the SDK built-in retries (e.g., due to connection loss), the lock won't be renewed, and the message will become unlocked and available for processing by competing consumers. Lock renewal should be treated as a best effort, not as a guaranteed operation.
64
+
> Message lock renewal is initiated by client code, not the broker. If a request to renew a lock fails after all the SDK built-in retries (e.g., due to connection loss), the lock won't be renewed, and the message will become unlocked and available for processing by competing consumers. Lock renewal should be treated as a best effort, not as a guaranteed operation.
65
65
66
66
> [!NOTE]
67
-
> If message lock renewal is required, it may be worth checking the duration of the handlers, and see whether these can be optimised. In addition, it may be worth checking whether the prefetch count is too high, considering all messages are locked on peek. This may indicate that too many messages are locked for which the processing exceeds the lock duration.
67
+
> The following approaches may be considered to minimize or avoid the occurrence of message lock renewals:
68
+
>
69
+
> - Optimise the message handlers to reduce their execution time.
70
+
> - Reduce the prefetch count. All messages are locked on peek, so when they are prefetched, they remain locked until they are all processed.
0 commit comments