|
|
@@ -152,7 +152,7 @@ namespace DotNetCore.CAP.Internal |
|
|
|
client.OnMessageReceived += async (sender, transportMessage) => |
|
|
|
{ |
|
|
|
_logger.MessageReceived(transportMessage.GetId(), transportMessage.GetName()); |
|
|
|
|
|
|
|
|
|
|
|
long? tracingTimestamp = null; |
|
|
|
try |
|
|
|
{ |
|
|
@@ -182,8 +182,16 @@ namespace DotNetCore.CAP.Internal |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
transportMessage.Headers.Add(Headers.Exception, nameof(SerializationException) + "-->" + e.Message); |
|
|
|
var dataUri = $"data:{transportMessage.Headers[Headers.Type]};base64," + Convert.ToBase64String(transportMessage.Body); |
|
|
|
message = new Message(transportMessage.Headers, dataUri); |
|
|
|
if (transportMessage.Headers.TryGetValue(Headers.Type, out var val)) |
|
|
|
{ |
|
|
|
var dataUri = $"data:{val};base64," + Convert.ToBase64String(transportMessage.Body); |
|
|
|
message = new Message(transportMessage.Headers, dataUri); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var dataUri = "data:UnknownType;base64," + Convert.ToBase64String(transportMessage.Body); |
|
|
|
message = new Message(transportMessage.Headers, dataUri); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (message.HasException()) |
|
|
|