Azure / Azure/durabletask

Check for null or empty message list from session.ReceiveBatchAsync() before calling session.CompleteBatchAsync()

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.