Registers a producer with MassTransit using CLI prompts
This command will register a producer with MassTransit using CLI prompts. This is especially useful for adding a new publish action to an existing feature (e.g. EntityCreated).
This command must be ran from the bounded context directory for a project that was made using the
new domain
oradd bc
command. It should have asrc
andtest
directory.
craftsman register producer [options]
Option | Description |
---|---|
-h, --help | Display help message. No filepath is needed to display the help message. |
The CLI will prompt your for the following items from the producer template.
One thing that Craftsman won't be able to do for you here is update your existing tests to capture the new producer you just registered. To do this, you'll want to add something like the below to your feature tests for the new producer you registered.
(await IsFaultyPublished<MESSAGENAME>()).Should().BeFalse();
(await IsPublished<MESSAGENAME>()).Should().BeTrue();
craftsman register producer -h
craftsman register producer