Пример #1
0
        static void SetupStorageSatellite(FeatureConfigurationContext context, TransportTransactionMode requiredTransactionSupport)
        {
            var satelliteLogicalAddress = context.Settings.LogicalAddress().CreateQualifiedAddress("Timeouts");
            var satelliteAddress        = context.Settings.GetTransportAddress(satelliteLogicalAddress);

            context.AddSatelliteReceiver("Timeout Message Processor", satelliteAddress, requiredTransactionSupport, PushRuntimeSettings.Default, RecoverabilityPolicy,
                                         (builder, pushContext) =>
            {
                var storeBehavior = new StoreTimeoutBehavior(
                    builder.Build <ExpiredTimeoutsPoller>(),
                    builder.Build <IDispatchMessages>(),
                    builder.Build <IPersistTimeouts>(),
                    context.Settings.EndpointName().ToString());

                return(storeBehavior.Invoke(pushContext));
            });

            context.Settings.Get <TimeoutManagerAddressConfiguration>().Set(satelliteAddress);
        }
Пример #2
0
        static void SetupStorageSatellite(FeatureConfigurationContext context, PushRuntimeSettings pushRuntimeSettings)
        {
            var satelliteLogicalAddress = context.Receiving.LogicalAddress.CreateQualifiedAddress("Timeouts");
            var satelliteAddress        = context.Settings.GetTransportAddress(satelliteLogicalAddress);

            context.AddSatelliteReceiver("Timeout Message Processor", satelliteAddress, pushRuntimeSettings, RecoverabilityPolicy,
                                         (builder, messageContext) =>
            {
                var storeBehavior = new StoreTimeoutBehavior(
                    builder.GetRequiredService <ExpiredTimeoutsPoller>(),
                    builder.GetRequiredService <IDispatchMessages>(),
                    builder.GetRequiredService <IPersistTimeouts>(),
                    context.Settings.EndpointName());

                return(storeBehavior.Invoke(messageContext));
            });

            context.Settings.Get <TimeoutManagerAddressConfiguration>().Set(satelliteAddress);
        }
Пример #3
0
        static void SetupStorageSatellite(FeatureConfigurationContext context, TransportTransactionMode requiredTransactionSupport, PushRuntimeSettings pushRuntimeSettings)
        {
            var satelliteLogicalAddress = context.Settings.LogicalAddress().CreateQualifiedAddress("Timeouts");
            var satelliteAddress = context.Settings.GetTransportAddress(satelliteLogicalAddress);

            context.AddSatelliteReceiver("Timeout Message Processor", satelliteAddress, requiredTransactionSupport, pushRuntimeSettings, RecoverabilityPolicy,
                (builder, pushContext) =>
                {
                    var storeBehavior = new StoreTimeoutBehavior(
                        builder.Build<ExpiredTimeoutsPoller>(),
                        builder.Build<IDispatchMessages>(),
                        builder.Build<IPersistTimeouts>(),
                        context.Settings.EndpointName().ToString());

                    return storeBehavior.Invoke(pushContext);
                });

            context.Settings.Get<TimeoutManagerAddressConfiguration>().Set(satelliteAddress);
        }