Esempio n. 1
0
        public SagaHubActor(IPublisher publisher,
                            IPersistentChildsRecycleConfiguration recycleConf,
                            ISagaProducer <TSaga> sagaProducer) : base(recycleConf, typeof(TSaga).Name)
        {
            _acceptMessagesSagaIds = sagaProducer.Descriptor.AcceptMessages.ToDictionary(m => m.MessageType, m => m.CorrelationField);

            _sagaStartMessages = new HashSet <Type>(sagaProducer.KnownDataTypes.Where(t => typeof(DomainEvent).IsAssignableFrom(t)));
            _publisher         = publisher;
        }
Esempio n. 2
0
 public PersistentHubActor(IPersistentChildsRecycleConfiguration recycleConfiguration, string counterName)
 {
     _recycleConfiguration = recycleConfiguration;
     _monitor = new ActorMonitor(Context, $"Hub_{counterName}");
 }
Esempio n. 3
0
 public AggregateHubActor(ICommandAggregateLocator <TAggregate> locator, IPersistentChildsRecycleConfiguration conf) : base(conf, typeof(TAggregate).Name)
 {
     _actorType = typeof(AggregateActor <TAggregate>);
     _locator   = locator;
 }