Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 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;
 }
Esempio n. 7
0
 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);
 }