浏览代码

Fix received storage message retry bug. #473

master
Savorboard 5 年前
父节点
当前提交
77052cb1ae
共有 3 个文件被更改,包括 11 次插入2 次删除
  1. +1
    -1
      build/version.props
  2. +9
    -1
      src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs
  3. +1
    -0
      src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs

+ 1
- 1
build/version.props 查看文件

@@ -2,7 +2,7 @@
<PropertyGroup>
<VersionMajor>3</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionPatch>0</VersionPatch>
<VersionPatch>1</VersionPatch>
<VersionQuality></VersionQuality>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
</PropertyGroup>


+ 9
- 1
src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs 查看文件

@@ -9,6 +9,7 @@ using DotNetCore.CAP.Messages;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Internal;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;

namespace DotNetCore.CAP.Internal
{
@@ -62,7 +63,14 @@ namespace DotNetCore.CAP.Internal
}
else
{
executeParameters[i] = message.Value;
if (message.Value is JObject jValue) //reading from storage
{
executeParameters[i] = jValue.ToObject(parameterDescriptors[i].ParameterType);
}
else
{
executeParameters[i] = message.Value;
}
}
}



+ 1
- 0
src/DotNetCore.CAP/Processor/IProcessor.NeedRetry.cs 查看文件

@@ -55,6 +55,7 @@ namespace DotNetCore.CAP.Processor

foreach (var message in messages)
{
//the message.Origin.Value maybe JObject
await _messageSender.SendAsync(message);

await context.WaitAsync(_delay);


正在加载...
取消
保存