The template for the file used when adding a message bus to a project using the `add consumer`, `add bc`, or `new domain` commands.
|A deliberately long name to try and promote readability. This is a string that will determine the name of the method used to register the consumer inside MassTransit.
|A string that determines the name of the consumer.
|A string that determines the name of the message the consumer will, well, consume!
|A string that determines the name of the queue that you want this particular consumer to be linked to for getting messages.
|A string that determines the name of the exchange that this consumer will be tied to. Note that this should match exchange name in the producer that you want this to be linked to.
|The type of exchange you want to use. This can be set to
|A string value that determines the routing key that you want to use if you are working with a
topic exchange. This can be excluded for
|A boolean that determines whether or not you want to use a quorum queue. This is generally recommended as a best practice.
|A boolean that determines whether or not you want to use a lazy queue. This is generally recommended as a best practice. Generally, these can be disabled if you require really high performance, if the queues are always short, or if you have set a max-length policy
|A boolean that determines whether ot not the scaffolded consumer feature will inject the db context in the project.
When adding consumers to an existing project, be sure to run the
add buscommand if you don't already have a message bus in your project. This bus command should be completed before running an
In this example, we're adding a message bus, consumer, message, and producer to our project. Notice how the exchange and message names match between the producer and the consumer.
- Name: ISendReportRequest
- Name: ReportId
- Name: Provider
- Name: Target
- ProjectName: Reporting
- EndpointRegistrationMethodName: SubmitReportRequest
- EndpointRegistrationMethodName: AllReportsGetSentFromHereEndpoint
# additional new domain properties here
If you've already created your Wrapt project and want to add one or more consumers after the fact, you can use the
add consumer command to pass through one or more consumers to your project.
Make sure you have a message bus already in your project. If you don't have a bus, you add one with the
add bus command.
This particular example will add consumers using a direct exchange.
- EndpointRegistrationMethodName: EmailReportsEndpoint
- EndpointRegistrationMethodName: FaxReportsEndpoint
If you wanted to do a
topic exchange, it might look like this:
- EndpointRegistrationMethodName: CloudReportsEndpoint