Bladeren bron

revert FetchNextMessageAsync sql

undefined
Savorboard 7 jaren geleden
bovenliggende
commit
d918ea8f1e
1 gewijzigde bestanden met toevoegingen van 5 en 2 verwijderingen
  1. +5
    -2
      src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs

+ 5
- 2
src/DotNetCore.CAP.MySql/MySqlStorageConnection.cs Bestand weergeven

@@ -41,8 +41,11 @@ namespace DotNetCore.CAP.MySql
public Task<IFetchedMessage> FetchNextMessageAsync()
{
var sql = $@"
SELECT @MId:=`MessageId` as MessageId, @MType:=`MessageType` as MessageType FROM `{_prefix}.queue` LIMIT 1;
DELETE FROM `{_prefix}.queue` where `MessageId` = @MId AND `MessageType`=@MType;";
SELECT `MessageId`,`MessageType` FROM `{_prefix}.queue` LIMIT 1 FOR UPDATE;
DELETE FROM `{_prefix}.queue` LIMIT 1;";
// var sql = $@"
//SELECT @MId:=`MessageId` as MessageId, @MType:=`MessageType` as MessageType FROM `{_prefix}.queue` LIMIT 1;
//DELETE FROM `{_prefix}.queue` where `MessageId` = @MId AND `MessageType`=@MType;";

return FetchNextMessageCoreAsync(sql);
}


Laden…
Annuleren
Opslaan