Commit d101c75c authored by Savorboard's avatar Savorboard

Fix dashboard requeue and reconsume failed bug. #482

parent 5cefd76b
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
using System.Reflection; using System.Reflection;
using DotNetCore.CAP.Dashboard.Pages; using DotNetCore.CAP.Dashboard.Pages;
using DotNetCore.CAP.Internal; using DotNetCore.CAP.Internal;
using DotNetCore.CAP.Serialization;
using DotNetCore.CAP.Transport; using DotNetCore.CAP.Transport;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
...@@ -102,7 +103,8 @@ namespace DotNetCore.CAP.Dashboard ...@@ -102,7 +103,8 @@ namespace DotNetCore.CAP.Dashboard
(client, messageId) => (client, messageId) =>
{ {
var msg = client.Storage.GetMonitoringApi().GetPublishedMessageAsync(messageId) var msg = client.Storage.GetMonitoringApi().GetPublishedMessageAsync(messageId)
.GetAwaiter().GetResult(); .GetAwaiter().GetResult();
msg.Origin = StringSerializer.DeSerialize(msg.Content);
client.RequestServices.GetService<IDispatcher>().EnqueueToPublish(msg); client.RequestServices.GetService<IDispatcher>().EnqueueToPublish(msg);
}); });
Routes.AddPublishBatchCommand( Routes.AddPublishBatchCommand(
...@@ -111,6 +113,7 @@ namespace DotNetCore.CAP.Dashboard ...@@ -111,6 +113,7 @@ namespace DotNetCore.CAP.Dashboard
{ {
var msg = client.Storage.GetMonitoringApi().GetReceivedMessageAsync(messageId) var msg = client.Storage.GetMonitoringApi().GetReceivedMessageAsync(messageId)
.GetAwaiter().GetResult(); .GetAwaiter().GetResult();
msg.Origin = StringSerializer.DeSerialize(msg.Content);
client.RequestServices.GetService<ISubscribeDispatcher>().DispatchAsync(msg); client.RequestServices.GetService<ISubscribeDispatcher>().DispatchAsync(msg);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment