Exemple #1
0
 public SagaWorker(ISagaRepository <TSaga> sagaRepository, WorkerSettings settings)
 {
     _sagaRepository  = sagaRepository;
     _inProgress      = 0;
     _inProgressLimit = settings.InProgressLimit;
     _pendingLimit    = settings.PendingLimit;
 }
Exemple #2
0
        public Worker(Func <T, Action <T> > getConsumer, WorkerSettings settings)
        {
            _getConsumer = getConsumer;

            _inProgress      = 0;
            _inProgressLimit = settings.InProgressLimit;
            _pendingLimit    = settings.PendingLimit;
        }
        public static void ImplementDistributorWorker <TMessage>(this ServiceBusConfigurator configurator,
                                                                 Func <TMessage, Action <TMessage> > getConsumer, int inProgressLimit, int pendingLimit)
            where TMessage : class
        {
            var settings = new WorkerSettings
            {
                InProgressLimit = inProgressLimit,
                PendingLimit    = pendingLimit
            };

            configurator.AddService(BusServiceLayer.Presentation, () => new Worker <TMessage>(getConsumer, settings));
        }
Exemple #4
0
 public SagaWorker(WorkerSettings settings)
 {
     _inProgress      = 0;
     _inProgressLimit = settings.InProgressLimit;
     _pendingLimit    = settings.PendingLimit;
 }