public OldestNonAckedMessageUpdaterPeriodicAction(IBus bus, IPeerStateRepository peerStateRepository, PersistenceCqlDataContext dataContext, ICqlPersistenceConfiguration configuration)
     : base(bus, configuration.OldestMessagePerPeerCheckPeriod)
 {
     _peerStateRepository = peerStateRepository;
     _dataContext         = dataContext;
     _configuration       = configuration;
 }
Beispiel #2
0
        public CqlStorage(PersistenceCqlDataContext dataContext, IPeerStateRepository peerStateRepository, IPersistenceConfiguration configuration, IReporter reporter)
        {
            _dataContext         = dataContext;
            _peerStateRepository = peerStateRepository;
            _configuration       = configuration;
            _reporter            = reporter;

            _preparedStatement = dataContext.Session.Prepare(dataContext.PersistentMessages.Insert(new PersistentMessage()).SetTTL(0).SetTimestamp(default(DateTimeOffset)).ToString());
            _parallelPersistor = new ParallelPersistor(dataContext.Session, 64, ex => _log.Warn("Exception caught while trying to persist message", ex));
        }