/// <summary>
 /// Gives implementations access to the <see cref="T:NServiceBus.BusConfiguration"/> instance at configuration time.
 /// </summary>
 protected override void Configure(BusConfiguration config)
 {
     config.EnableFeature <SqlServerTransportFeature>();
     config.EnableFeature <MessageDrivenSubscriptions>();
     config.EnableFeature <TimeoutManagerBasedDeferral>();
     config.GetSettings().EnableFeatureByDefault <StorageDrivenPublishing>();
     config.GetSettings().EnableFeatureByDefault <TimeoutManager>();
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gives implementations access to the <see cref="T:NServiceBus.BusConfiguration"/> instance at configuration time.
        /// </summary>
        protected override void Configure(BusConfiguration config)
        {
            config.EnableFeature <RabbitMqTransportFeature>();
            config.EnableFeature <TimeoutManagerBasedDeferral>();

            config.GetSettings().EnableFeatureByDefault <TimeoutManager>();

            //enable the outbox unless the users hasn't disabled it
            if (config.GetSettings().GetOrDefault <bool>(typeof(Features.Outbox).FullName))
            {
                config.EnableOutbox();
            }
        }
        /// <summary>
        /// Gives implementations access to the <see cref="T:NServiceBus.BusConfiguration"/> instance at configuration time.
        /// </summary>
        protected override void Configure(BusConfiguration config)
        {
            config.EnableFeature <KafkaTransportFeature>();
            config.EnableFeature <TimeoutManagerBasedDeferral>();

            config.GetSettings().EnableFeatureByDefault <TimeoutManager>();
        }
Ejemplo n.º 5
0
        protected override void Configure(BusConfiguration config)
        {
            config.EnableFeature <SqsTransportFeature>();
            config.EnableFeature <MessageDrivenSubscriptions>();

            if (!config.GetSettings().UseSqsDeferral())
            {
                config.EnableFeature <TimeoutManagerBasedDeferral>();
                config.GetSettings().EnableFeatureByDefault <TimeoutManager>();
            }

            config.GetSettings().EnableFeatureByDefault <StorageDrivenPublishing>();

            //enable the outbox unless the users hasn't disabled it
            if (config.GetSettings().GetOrDefault <bool>(typeof(Features.Outbox).FullName))
            {
                config.EnableOutbox();
            }
        }
        /// <summary>
        ///     Configure the distributor to run on this endpoint
        /// </summary>
        /// <param name="config"></param>
        /// <param name="withWorker"><value>true</value> if this endpoint should enlist as a worker, otherwise <value>false</value>. Default is <value>true</value>.</param>
        public static void RunMSMQDistributor(this BusConfiguration config, bool withWorker = true)
        {
            config.EnableFeature <Distributor.MSMQ.Distributor>();

            if (withWorker)
            {
                config.GetSettings().Set("Distributor.WithWorker", true);
                EnlistWithMSMQDistributor(config);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Creates a bus instance to be used in send only mode
        /// </summary>
        /// <param name="configuration">The configuration to use</param>
        /// <returns></returns>
        public static ISendOnlyBus CreateSendOnly(BusConfiguration configuration)
        {
            configuration.GetSettings().Set("Endpoint.SendOnly", true);

            var config = configuration.BuildConfiguration();

            config.Initialize();

            return(config.Builder.Build <ISendOnlyBus>());
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Gives implementations access to the <see cref="BusConfiguration"/> instance at configuration time.
        /// </summary>
        protected internal override void Configure(BusConfiguration config)
        {
            // For MSMQ the endpoint differentiator is a no-op since you commonly scale out by running the same endpoint on a different machine.
            // if users want to run more than one instance on the same machine they need to set an explicit discriminator
            config.GetSettings()
            .SetDefault("EndpointInstanceDiscriminator", "");

            config.EnableFeature <MsmqTransportConfigurator>();
            config.EnableFeature <MessageDrivenSubscriptions>();
            config.EnableFeature <TimeoutManagerBasedDeferral>();

            config.Settings.EnableFeatureByDefault <StorageDrivenPublishing>();
            config.Settings.EnableFeatureByDefault <TimeoutManager>();
        }