Add Bus Command

Adds a message bus to your project.

This command will add a MassTransit message bus to an existing Wrapt project using a formatted yaml or json file. This is the input file template.

This command will:

  • Add a new MassTransit service registration
  • Register it in your startups
  • Add the message broker credentials in your app settings
  • Add a MassTransit harness to your integration tests
  • Add any consumers, producers, and messages designated by the configuration
  • Build a Messages project in your root and add reference to it in your WebApi project.

This command must be ran from one of your bounded context directories for a project.

craftsman add bus [options] <filepath>

Add Bus Arguments

ArgumentDescription
filepathThe filepath for the yaml or json file that describes the bus that you want to add to your API. This is optional for this command.

💡 The filepath is optional when using this command since all of the settings have safe defaults. This file is only needed if you want to change those settings

Add Bus Options

OptionDescription
-h, --helpDisplay help message. No filepath is needed to display the help message.

Add Bus Example Commands

craftsman add bus
craftsman add bus C:\fullpath\newbus.yaml
craftsman add bus C:\fullpath\newbus.yml
craftsman add bus C:\fullpath\newbus.json