示例#1
0
        /// <summary>
        /// Enables the outbox feature
        /// </summary>
        public static OutboxSettings EnableOutbox(this BusConfiguration config)
        {
            var outboxSettings = new OutboxSettings(config.Settings);

            config.Transactions()
            .DisableDistributedTransactions()
            .DoNotWrapHandlersExecutionInATransactionScope();
            config.EnableFeature <Features.Outbox>();
            return(outboxSettings);
        }
示例#2
0
        protected override void Configure(BusConfiguration config)
        {
            config.UseSerialization <JsonSerializer>(); //not strictly necessary, but....xml sucks :-)
            config.EnableFeature <RavenDBTransport>();
            config.EnableFeature <MessageDrivenSubscriptions>();
            config.EnableFeature <TimeoutManagerBasedDeferral>();
            config.GetSettings().EnableFeatureByDefault <StorageDrivenPublishing>();
            config.GetSettings().EnableFeatureByDefault <TimeoutManager>();

            config.Transactions().Disable();//.DisableDistributedTransactions().DoNotWrapHandlersExecutionInATransactionScope(); //hmmm; not working get transaction conflicts in dequeue
            //config.DisableDurableMessages();
        }
示例#3
0
        public static void TweakConfigurationBuilder(IConfigureThisEndpoint specifier, BusConfiguration config)
        {
            if (specifier is AsA_Worker)
            {
                config.Transactions().Enable();
                config.EnableFeature <Features.Sagas>();
            }

            Type transportDefinitionType;

            if (TryGetTransportDefinitionType(specifier, out transportDefinitionType))
            {
                config.UseTransport(transportDefinitionType);
            }
        }
示例#4
0
        public static void TweakConfigurationBuilder(IConfigureThisEndpoint specifier, BusConfiguration config)
        {
            if (specifier is AsA_Server)
            {
                config.ScaleOut().UseSingleBrokerQueue();
            }
            else if (specifier is AsA_Client)
            {
                config.PurgeOnStartup(true);
                config.Transactions().Disable();

                config.DisableFeature <Features.SecondLevelRetries>();
                config.DisableFeature <StorageDrivenPublishing>();
                config.DisableFeature <TimeoutManager>();
            }

            Type transportDefinitionType;

            if (TryGetTransportDefinitionType(specifier, out transportDefinitionType))
            {
                config.UseTransport(transportDefinitionType);
            }
        }