public CommandExecuteContext(IRepository repository, QueueMessage queueMessage, IMessageContext messageContext, CommandMessage commandMessage, SendReplyService sendReplyService) { _trackingAggregateRootDict = new ConcurrentDictionary <string, IAggregateRoot>(); _repository = repository; _sendReplyService = sendReplyService; _queueMessage = queueMessage; _commandMessage = commandMessage; _messageContext = messageContext; }
public DomainEventConsumer InitializeENode(bool sendEventHandledMessage = true) { _sendReplyService = new SendReplyService("EventConsumerSendReplyService"); _jsonSerializer = ObjectContainer.Resolve <IJsonSerializer>(); _eventSerializer = ObjectContainer.Resolve <IEventSerializer>(); _messageProcessor = ObjectContainer.Resolve <IProcessingEventProcessor>(); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); _sendEventHandledMessage = sendEventHandledMessage; return(this); }
public CommandConsumer(string groupName = null, ConsumerSetting setting = null) { _consumer = new Consumer(groupName ?? DefaultCommandConsumerGroup, setting); _sendReplyService = new SendReplyService(); _jsonSerializer = ObjectContainer.Resolve <IJsonSerializer>(); _typeNameProvider = ObjectContainer.Resolve <ITypeNameProvider>(); _processor = ObjectContainer.Resolve <IMessageProcessor <ProcessingCommand, ICommand, CommandResult> >(); _repository = ObjectContainer.Resolve <IRepository>(); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); }
public CommandConsumer InitializeENode() { _sendReplyService = new SendReplyService("CommandConsumerSendReplyService"); _jsonSerializer = ObjectContainer.Resolve <IJsonSerializer>(); _typeNameProvider = ObjectContainer.Resolve <ITypeNameProvider>(); _commandProcessor = ObjectContainer.Resolve <ICommandProcessor>(); _repository = ObjectContainer.Resolve <IRepository>(); _aggregateStorage = ObjectContainer.Resolve <IAggregateStorage>(); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); return(this); }
public DomainEventConsumer(string groupName = null, ConsumerSetting setting = null, bool sendEventHandledMessage = true) { _consumer = new Consumer(groupName ?? DefaultEventConsumerGroup, setting ?? new ConsumerSetting { MessageHandleMode = MessageHandleMode.Sequential }); _sendReplyService = new SendReplyService(); _jsonSerializer = ObjectContainer.Resolve <IJsonSerializer>(); _eventSerializer = ObjectContainer.Resolve <IEventSerializer>(); _processor = ObjectContainer.Resolve <IMessageProcessor <ProcessingDomainEventStreamMessage, DomainEventStreamMessage, bool> >(); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); _sendEventHandledMessage = sendEventHandledMessage; }
public DomainEventConsumer(string groupName = null, ConsumerSetting setting = null, bool sendEventHandledMessage = true) { _consumer = new Consumer(groupName ?? DefaultEventConsumerGroup, setting ?? new ConsumerSetting { MessageHandleMode = MessageHandleMode.Sequential }); _sendReplyService = new SendReplyService(); _jsonSerializer = ObjectContainer.Resolve<IJsonSerializer>(); _eventSerializer = ObjectContainer.Resolve<IEventSerializer>(); _processor = ObjectContainer.Resolve<IMessageProcessor<ProcessingDomainEventStreamMessage, DomainEventStreamMessage, bool>>(); _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName); _sendEventHandledMessage = sendEventHandledMessage; }
public CommandConsumer(string groupName = null, ConsumerSetting setting = null) { _consumer = new Consumer(groupName ?? DefaultCommandConsumerGroup, setting ?? new ConsumerSetting { ConsumeFromWhere = ConsumeFromWhere.FirstOffset }); _sendReplyService = new SendReplyService(); _jsonSerializer = ObjectContainer.Resolve <IJsonSerializer>(); _typeNameProvider = ObjectContainer.Resolve <ITypeNameProvider>(); _processor = ObjectContainer.Resolve <ICommandProcessor>(); _repository = ObjectContainer.Resolve <IRepository>(); _aggregateRootStorage = ObjectContainer.Resolve <IAggregateStorage>(); _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); }