Ejemplo n.º 1
0
        public HarnessRegistry()
        {
            //Comment out in order to test with LightningQueues
            //EnableInMemoryTransport();

            Features.Diagnostics.Enable(TraceLevel.Verbose);

            Services.ForSingletonOf <MessagePumper>();
            Services.ForSingletonOf <INumberCache>().Use <NumberCache>();

            // TODO -- publish everything option in the FI?
            Channel(x => x.Channel).ReadIncoming().AcceptsMessages(x => x != typeof(TraceMessage)).DefaultSerializer <XmlMessageSerializer>();

            Policies.Global.Add <ErrorHandlingPolicy>();

            Policies.Global.Add <TransactionalBehaviorPolicy>();

            SubscribeLocally().ToSource(x => x.Publisher)
            .ToMessage <NumberMessage>();

            Channel(x => x.Publisher)
            .ReadIncoming()
            .AcceptsMessage <TraceMessage>()
            .DefaultSerializer <XmlMessageSerializer>();

            Polling.RunJob <SampleJob>().ScheduledAtInterval <HarnessSettings>(x => x.SampleJobTime).RunImmediately();

            AlterSettings <StoreOptions>(_ =>
            {
                _.Connection(Environment.GetEnvironmentVariable("marten-testing-database"));
            });
        }
        public PollingImmediateRegistry()
        {
            EnableInMemoryTransport();

            Polling.RunJob <ImmediateJob>().ScheduledAtInterval <PollingImmediateSettings>(x => x.ImmediateInterval).RunImmediately();
            Polling.RunJob <DelayJob>().ScheduledAtInterval <PollingImmediateSettings>(x => x.DelayInterval);
        }
Ejemplo n.º 3
0
        public PollingRegistry()
        {
            EnableInMemoryTransport();

            Polling.RunJob <OneJob>().ScheduledAtInterval <PollingSettings>(x => x.OneInterval);
            Polling.RunJob <TwoJob>().ScheduledAtInterval <PollingSettings>(x => x.TwoInterval);
            Polling.RunJob <ThreeJob>().ScheduledAtInterval <PollingSettings>(x => x.ThreeInterval).RunImmediately();

            Polling.RunJob <DisabledJob>().ScheduledAtInterval <PollingSettings>(x => x.DisabledInterval).Disabled();

            Services(x => x.ReplaceService <IPollingJobLogger, RecordingPollingJobLogger>());
        }
Ejemplo n.º 4
0
        public BuiltInPollingJobRegistry()
        {
            Handlers.DisableDefaultHandlerSource();
            Polling.RunJob <DelayedEnvelopeProcessor>()
            .ScheduledAtInterval <TransportSettings>(x => x.DelayMessagePolling);

            Polling.RunJob <ExpiringListenerCleanup>()
            .ScheduledAtInterval <TransportSettings>(x => x.ListenerCleanupPolling);

            Polling.RunJob <HealthMonitorPollingJob>()
            .ScheduledAtInterval <HealthMonitoringSettings>(x => x.Interval);

            Polling.RunJob <SubscriptionRefreshJob>()
            .ScheduledAtInterval <TransportSettings>(x => x.SubscriptionRefreshPolling);
        }
 public LightningQueuesJobRegistry()
 {
     Handlers.DisableDefaultHandlerSource();
     Polling.RunJob <PurgeQueuesJob>()
     .ScheduledAtInterval <LightningQueueSettings>(x => x.PurgeQueuesPolling);
 }
Ejemplo n.º 6
0
 public PollingJobSampleTransportRegistry()
 {
     Polling.RunJob <PomodoroJob>().ScheduledAtInterval <PomodoroSettings>(x => x.Interval);
 }