The registrar for autofac just uses builder.RegisterType (), then you could ask the container for all types which implement IConsumer and add them to the registration in the AddMassTransit section, similar to how they're added by namespace. To add a saga registration and configure the consumer endpoint in the same expression, a definition can automatically be created. Also seems there is some Ninject or Structuremap config in there too. The host options can be configured via MassTransitHostOptions using the Options pattern as shown below.Ĭlass SubmitOrderConsumer : IConsumer ) Copy to clipboard MassTransit adds a hosted service so that the generic host can start and stop the bus (or buses, if multiple bus instances are configured). To configure multiple bus instances in the same service collection, refer to the MultiBus section. higher-level service bus like NServiceBus, MassTransit, or Brighter to articulate your event. Health checks for the bus (or buses) and receive endpoints MassTransit has extensive exception handling options, including retry and redelivery, and also supports poison messages by moving them to an error queue as w. entire application can scale, it is not really a problem.The bus endpoint with the default settings (not started by default).Several interfaces (and their implementations, appropriate for the transport specified).Any methods to configure the bus instance (using x) should be called outside of this callback.Īdding MassTransit, as shown above, will configure the service collection with required components, including: This error means that Autofac tried to resolve a service based on an application request but that service was not registered in the container/lifetime scope. The callback passed to the UsingRabbitMq method is invoked after the service collection has been built.
0 Comments
Leave a Reply. |