diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs index 879cf4f8ff..8d61850dd1 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs @@ -181,7 +181,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ var context = new JobExecutionContext( scope.ServiceProvider, JobConfiguration.JobType, - Serializer.Deserialize(ea.Body, typeof(TArgs)) + Serializer.Deserialize(ea.Body.ToArray(), typeof(TArgs)) ); try @@ -210,4 +210,4 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index c530437e6f..ed7d37db20 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -83,7 +83,7 @@ namespace Volo.Abp.EventBus.RabbitMq return; } - var eventData = Serializer.Deserialize(ea.Body, eventType); + var eventData = Serializer.Deserialize(ea.Body.ToArray(), eventType); await TriggerHandlersAsync(eventType, eventData); } @@ -237,4 +237,4 @@ namespace Volo.Abp.EventBus.RabbitMq return false; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj index 1a7860deeb..a21be8bdfa 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj +++ b/framework/src/Volo.Abp.RabbitMQ/Volo.Abp.RabbitMQ.csproj @@ -15,7 +15,7 @@ - +