Browse Source

add determines whether the query is null.

undefined
Savorboard 7 years ago
parent
commit
2e81f2bcdf
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/DotNetCore.CAP/IQueueExecutor.Subscribe.cs

+ 7
- 0
src/DotNetCore.CAP/IQueueExecutor.Subscribe.cs View File

@@ -32,6 +32,13 @@ namespace DotNetCore.CAP
public async Task<OperateResult> ExecuteAsync(IStorageConnection connection, IFetchedMessage fetched) public async Task<OperateResult> ExecuteAsync(IStorageConnection connection, IFetchedMessage fetched)
{ {
var message = await connection.GetReceivedMessageAsync(fetched.MessageId); var message = await connection.GetReceivedMessageAsync(fetched.MessageId);

if (message == null)
{
_logger.LogError($"Can not find mesage at cap received message table, message id:{fetched.MessageId} !!!");
return OperateResult.Failed();
}

try try
{ {
var sp = Stopwatch.StartNew(); var sp = Stopwatch.StartNew();


Loading…
Cancel
Save