Permalink
Browse files

remove al traces of command logging

  • Loading branch information...
1 parent ce79f62 commit cabe3f5b1a867f5112145acd1b46cec05bb300b4 @fsimonazzi committed Jun 7, 2012
@@ -55,10 +55,7 @@ partial class MvcApplication
new ServiceBusConfig(settings.ServiceBus).Initialize();
var commandBus = new CommandBus(new TopicSender(settings.ServiceBus, "conference/commands"), metadata, serializer);
- var messageLogAccount = CloudStorageAccount.Parse(settings.MessageLog.ConnectionString);
- var logWriter = new AzureMessageLogWriter(messageLogAccount, settings.MessageLog.TableName);
-
- var synchronousCommandBus = new SynchronousCommandBus(commandBus, logWriter);
+ var synchronousCommandBus = new SynchronousCommandBus(commandBus);
container.RegisterInstance<ICommandBus>(synchronousCommandBus);
container.RegisterInstance<ICommandHandlerRegistry>(synchronousCommandBus);
@@ -13,7 +13,6 @@
namespace Infrastructure.Azure.Tests.Messaging.SynchronousCommandBusFixture.given_empty_command_bus
{
- using Infrastructure.Azure.MessageLog;
using Infrastructure.Azure.Messaging;
using Infrastructure.Messaging;
using Moq;
@@ -22,15 +21,13 @@ namespace Infrastructure.Azure.Tests.Messaging.SynchronousCommandBusFixture.give
public class Context
{
protected readonly Mock<ICommandBus> wrappedBusMock;
- protected readonly Mock<IAzureMessageLogWriter> logWriterMock;
protected readonly SynchronousCommandBus sut;
public Context()
{
this.wrappedBusMock = new Mock<ICommandBus>();
- this.logWriterMock = new Mock<IAzureMessageLogWriter>();
- this.sut = new SynchronousCommandBus(this.wrappedBusMock.Object, this.logWriterMock.Object);
+ this.sut = new SynchronousCommandBus(this.wrappedBusMock.Object);
}
}
@@ -18,21 +18,18 @@ namespace Infrastructure.Azure.Messaging
using System.Diagnostics;
using System.Globalization;
using System.Linq;
- using Infrastructure.Azure.MessageLog;
using Infrastructure.Azure.Messaging.Handling;
using Infrastructure.Messaging;
using Infrastructure.Messaging.Handling;
public class SynchronousCommandBus : ICommandBus, ICommandHandlerRegistry
{
private readonly ICommandBus commandBus;
- private readonly IAzureMessageLogWriter logWriter;
private readonly CommandDispatcher commandDispatcher;
- public SynchronousCommandBus(ICommandBus commandBus, IAzureMessageLogWriter logWriter)
+ public SynchronousCommandBus(ICommandBus commandBus)
{
this.commandBus = commandBus;
- this.logWriter = logWriter;
this.commandDispatcher = new CommandDispatcher();
}
@@ -79,15 +76,7 @@ private bool DoSend(Envelope<ICommand> command)
var traceIdentifier = string.Format(CultureInfo.CurrentCulture, " (local handling of command with id {0})", command.Body.Id);
handled = this.commandDispatcher.ProcessMessage(traceIdentifier, command.Body, command.MessageId, command.CorrelationId);
- // ThreadPool.QueueUserWorkItem(_ =>
- // {
- // var messageLogEntity =
- // new MessageLogEntity
- // {
- // };
-
- // this.logWriter.Save(messageLogEntity);
- // });
+ // TODO try to log the command
}
catch (Exception e)
{

0 comments on commit cabe3f5

Please sign in to comment.