Check for null or empty message list from session.ReceiveBatchAsync() before calling session.CompleteBatchAsync()
Open
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
```
…
newMessages = await Utils.ExecuteWithRetries(() => session.ReceiveBatchAsync(PrefetchCount),
session.SessionId, "Receive Tracking Message Batch",
MaxRetriesServiceBus,
IntervalBetweenRetriesSecs);
….
…
IEnumerable lockTokens = newMessages.Select(m => m.LockToken);
Utils.SyncExecuteWithRetries(() =>
{
session.CompleteBatch(lockTokens);
return null;
},
```
The complete batch throws an error if lockTokens is an empty list.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.