diff --git a/src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs b/src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs index b1ef187..bbaeb6b 100644 --- a/src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs +++ b/src/DotNetCore.CAP/Internal/ISubscribeInvoker.Default.cs @@ -73,7 +73,14 @@ namespace DotNetCore.CAP.Internal } else { - executeParameters[i] = Convert.ChangeType(message.Value, parameterDescriptors[i].ParameterType); + if (parameterDescriptors[i].ParameterType.IsInstanceOfType(message.Value)) + { + executeParameters[i] = message.Value; + } + else + { + executeParameters[i] = Convert.ChangeType(message.Value, parameterDescriptors[i].ParameterType); + } } } }