Example #1
0
        internal EventsConfigurer(ConfigurationBackbone backbone)
            : base(backbone)
        {
            backbone.AddEvents(this);

            MessageMutators = new List<IMutateMessages>();
        }
Example #2
0
        internal EventsConfigurer(ConfigurationBackbone backbone)
            : base(backbone)
        {
            backbone.AddEvents(this);

            MessageMutators = new List <IMutateMessages>();
        }
Example #3
0
        static void VerifyComponents(ConfigurationBackbone backbone)
        {
            if (backbone.SendMessages == null && backbone.ReceiveMessages == null)
            {
                throw new ConfigurationException(
                          @"You need to configure Rebus to be able to at least either SEND or RECEIVE messages - otherwise it wouldn't be that useful, would it?

If, for some reason, you really really WANT to circumvent this rule, please feel free to get the bus by newing it up yourself - then you can do whatever you feel like.

This configuration API, however, will not let you create an unusable bus. You can configure the transport in one easy operation like so:

{0}

thus configuring the ability to send AND receive messages at the same time, using MSMQ for both.

There are other options available though - I suggest you go Configure.With(yourFavoriteContainerAdapter) and then let . and IntelliSense guide you.",
                          HelpText.TransportConfigurationExample);
            }

            if (backbone.ReceiveMessages != null && backbone.ErrorTracker == null)
            {
                throw new ConfigurationException(
                          @"When you configure Rebus to be able to receive messages, you must also configure a way to track errors in the event that message processing fails.

Usually, the error handling strategy is automatically configured when you configure the transport, so if you're seeing this message you're most likely experimenting with your own implementations of Rebus' abstractions.

In this case, you must supply an implementation of {0} to the configuration backbone.",
                          typeof(IErrorTracker).Name);
            }
        }
Example #4
0
        static void FillInDefaults(ConfigurationBackbone backbone)
        {
            if (backbone.SerializeMessages == null)
            {
                log.Debug("Defaulting to JSON serialization");
                backbone.SerializeMessages = new JsonMessageSerializer();
            }

            if (backbone.DetermineMessageOwnership == null)
            {
                log.Debug("Defaulting to 'throwing endpoint mapper' - i.e. the bus will throw an exception when you send a message that is not explicitly routed");
                backbone.DetermineMessageOwnership = new ThrowingEndpointMapper();
            }

            if (backbone.InspectHandlerPipeline == null)
            {
                backbone.InspectHandlerPipeline = new TrivialPipelineInspector();
            }

            if (backbone.StoreSagaData == null)
            {
                log.Debug("Defaulting to in-memory saga persister (should probably not be used for real)");
                backbone.StoreSagaData = new InMemorySagaPersister();
            }

            if (backbone.StoreSubscriptions == null)
            {
                log.Debug("Defaulting to in-memory subscription storage (should probably not be used for real)");
                backbone.StoreSubscriptions = new InMemorySubscriptionStorage();
            }
        }
Example #5
0
        internal IdempotentSagasManager(ConfigurationBackbone backbone)
        {
            if (backbone == null) throw new ArgumentNullException("backbone");

            this.backbone = backbone;
            RebusLoggerFactory.Changed += f => log = f.GetCurrentClassLogger();
            this.backbone.ConfigureEvents(x => AttachEventHandlers(x));
        }
Example #6
0
        /// <summary>
        /// Uses the specified <see cref="ConfigurationBackbone"/> to store references to implementations of all Rebus' abstractions
        /// </summary>
        internal protected BaseConfigurer(ConfigurationBackbone backbone)
        {
            if (backbone == null)
            {
                throw new ArgumentNullException("backbone", "Dude, don't try to create a configurer without a backbone!");
            }

            this.backbone = backbone;
        }
 /// <summary>
 /// Constructs the configurer
 /// </summary>
 public RebusTransportConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
 /// <summary>
 /// Constructs the configurer
 /// </summary>
 public RebusTransportConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #9
0
 protected BaseConfigurer(ConfigurationBackbone backbone)
 {
     this.backbone = backbone;
 }
Example #10
0
 internal RebusConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #11
0
        static void VerifyComponents(ConfigurationBackbone backbone)
        {
            if (backbone.SendMessages == null && backbone.ReceiveMessages == null)
            {
                throw new ConfigurationException(
                    @"You need to configure Rebus to be able to at least either SEND or RECEIVE messages - otherwise it wouldn't be that useful, would it?

If, for some reason, you really really WANT to circumvent this rule, please feel free to get the bus by newing it up yourself - then you can do whatever you feel like.

This configuration API, however, will not let you create an unusable bus. You can configure the transport in one easy operation like so:

{0}

thus configuring the ability to send AND receive messages at the same time, using MSMQ for both.

There are other options available though - I suggest you go Configure.With(yourFavoriteContainerAdapter) and then let . and IntelliSense guide you.",
                    HelpText.TransportConfigurationExample);
            }

            if (backbone.ReceiveMessages != null && backbone.ErrorTracker == null)
            {
                throw new ConfigurationException(
                    @"When you configure Rebus to be able to receive messages, you must also configure a way to track errors in the event that message processing fails.

Usually, the error handling strategy is automatically configured when you configure the transport, so if you're seeing this message you're most likely experimenting with your own implementations of Rebus' abstractions.

In this case, you must supply an implementation of {0} to the configuration backbone.",
                    typeof(IErrorTracker).Name);
            }
        }
 internal RebusSerializationConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #13
0
 public RebusSagasConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #14
0
 public LoggingConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #15
0
 public LoggingConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #16
0
 public RebusRoutingConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #17
0
 public DecoratorsConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #18
0
 protected BaseConfigurer(ConfigurationBackbone backbone)
 {
     this.backbone = backbone;
 }
 public RebusConfigurerWithLogging(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
 /// <summary>
 /// Constructs the confiurer
 /// </summary>
 public RebusSubscriptionsConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
 internal RebusConfigurerWithLogging(ConfigurationBackbone backbone) : base(backbone)
 {
 }
Example #22
0
 public RebusRoutingConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #23
0
 public RebusSagasConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #24
0
 public RebusSerializationConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #25
0
 internal RebusConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #26
0
 public RebusConfigurerWithLogging(ConfigurationBackbone backbone) : base(backbone)
 {
 }
Example #27
0
 public DecoratorsConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #28
0
        static void FillInDefaults(ConfigurationBackbone backbone)
        {
            if (backbone.SerializeMessages == null)
            {
                log.Debug("Defaulting to JSON serialization");
                backbone.SerializeMessages = new JsonMessageSerializer();
            }

            if (backbone.DetermineMessageOwnership == null)
            {
                log.Debug("Defaulting to 'throwing endpoint mapper' - i.e. the bus will throw an exception when you send a message that is not explicitly routed");
                backbone.DetermineMessageOwnership = new ThrowingEndpointMapper();
            }

            if (backbone.InspectHandlerPipeline == null)
            {
                backbone.InspectHandlerPipeline = new TrivialPipelineInspector();
            }

            if (backbone.StoreSagaData == null)
            {
                log.Debug("Defaulting to in-memory saga persister (should probably not be used for real)");
                backbone.StoreSagaData = new InMemorySagaPersister();
            }

            if (backbone.StoreSubscriptions == null)
            {
                log.Debug("Defaulting to in-memory subscription storage (should probably not be used for real)");
                backbone.StoreSubscriptions = new InMemorySubscriptionStorage();
            }
        }
 public RebusSerializationConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #30
0
        /// <summary>
        /// Uses the specified <see cref="ConfigurationBackbone"/> to store references to implementations of all Rebus' abstractions
        /// </summary>
        protected internal BaseConfigurer(ConfigurationBackbone backbone)
        {
            if (backbone == null) throw new ArgumentNullException("backbone", "Dude, don't try to create a configurer without a backbone!");

            this.backbone = backbone;
        }
Example #31
0
 public EventsConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
     backbone.AddEvents(this);
 }
 internal RebusSerializationConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
 internal RebusConfigurerWithLogging(ConfigurationBackbone backbone) : base(backbone)
 {
 }
 /// <summary>
 /// Constructs the confiurer
 /// </summary>
 public RebusSubscriptionsConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }
Example #35
0
 internal LoggingConfigurer(ConfigurationBackbone backbone)
     : base(backbone)
 {
 }