diff --git a/src/BuslyCLI.Console/Commands/Command/SendCommand.cs b/src/BuslyCLI.Console/Commands/Command/SendCommand.cs index 1094394..15aef63 100644 --- a/src/BuslyCLI.Console/Commands/Command/SendCommand.cs +++ b/src/BuslyCLI.Console/Commands/Command/SendCommand.cs @@ -40,8 +40,7 @@ await rawEndpoint.Dispatch( new TransportTransaction() ); - // TODO: Figure out why this causes connection closed errors with rabbitmq - // await rawEndpoint.ShutDownAndCleanUp(); + await rawEndpoint.ShutDownAndCleanUp(); return 0; } diff --git a/src/BuslyCLI.Console/Commands/Event/PublishCommand.cs b/src/BuslyCLI.Console/Commands/Event/PublishCommand.cs index f0896d8..c8bc3bd 100644 --- a/src/BuslyCLI.Console/Commands/Event/PublishCommand.cs +++ b/src/BuslyCLI.Console/Commands/Event/PublishCommand.cs @@ -45,8 +45,7 @@ await rawEndpoint.Dispatch( new TransportTransaction() ); - // TODO: Figure out why this causes connection closed errors with rabbitmq - // await rawEndpoint.ShutDownAndCleanUp(); + await rawEndpoint.ShutDownAndCleanUp(); return 0; } diff --git a/src/BuslyCLI.Console/Factories/RawEndpoint.cs b/src/BuslyCLI.Console/Factories/RawEndpoint.cs index 981a2a1..dc6d4ae 100644 --- a/src/BuslyCLI.Console/Factories/RawEndpoint.cs +++ b/src/BuslyCLI.Console/Factories/RawEndpoint.cs @@ -66,7 +66,7 @@ await _subscriptionManager.SubscribeAll([new MessageMetadata(CreateTypeFromStrin public Task OnMessage(MessageContext messageContext, CancellationToken cancellationToken) { _receivedMessages.Add( - new IncomingMessage(messageContext.NativeMessageId, messageContext.Headers, messageContext.Body), + new IncomingMessage(messageContext.NativeMessageId, messageContext.Headers, messageContext.Body.ToArray()), cancellationToken); return Task.CompletedTask; }