MassTransit Starting with Mediator
Why Stack Overflow recommends it
Stack Overflow users link it when asking how to set up MassTransit's in-process Mediator, and the library's author recommends it as the starting point before moving on to RabbitMQ.
Recommended by 2 people across 3 different months, 2020 to 2022.
What it is
First episode of a MassTransit tutorial series by its author, Chris Patterson. He starts from an empty ASP.NET Core project and builds a consumer that runs in-process using MassTransit's Mediator, then uses the request client in an API controller to send a request and return the response to the caller.
What people said
Recommends Chris Patterson · 2020-05 · Stack Overflow · on “Can we use RabbitMQ and Mediatr together using masstransit?”
They can be used together, and MassTransit has its own Mediator implementation as well so you can write your handlers once and use them either via the mediator or via a durable transport such as RabbitMQ. There are videos [this video] available that take you through the capabilities, starting with mediator and moving to RabbitMQ.
Recommends 0909EM · 2021-01 · Stack Overflow · on “How to configure MassTransit with Mediator to publish messages?”
I got to this from the (excellent) [this video] , in that sample there is a line of code AddMediator() which I couldn't locate. I believe the following setup provides everything needed to get code working based on that video... services.AddMassTransit(config => { config.AddRequestClient<ISubmitOrder>(); config.AddConsumersFromNamespaceContaining<SubmitOrderConsumer>(); config.UsingInMemory(ConfigureBus); }); and ConfigureBus is then: private void ConfigureBus(IBusRegistrationContext context, IInMemoryBusFactoryConfigurator configurator) { configurator.ConfigureEndpoints(context); } I couldn't readily find this elsewhere, hence posting here.
Recommends Chris Patterson · 2022-05 · Stack Overflow · on “How to get MassTransit Mediator to publish notifications in background?”
I'd recommend watching the mediator video first [this video] and then watching the move to RabbitMQ [LINK] to understand how a broker-based messaging solution differs from an in-process mediator pattern implementation.
Cites Trevor.Screws · 2020-10 · Stack Overflow · on “JetBrains Rider | MassTransit Anonymous Type | MCA0003 | "Add Missing Properties" command does not autocomplete the properties”
Background Operating Systems and IDEs Tested: JetBrains Rider 2020.2.4 on Linux Elementary 5.1 Hera | Fail JetBrains Rider 2020.2.4 on Windows 10 Home | Fail Visual Studio Professional 2019 on Windows 10 Home | Success Dotnet Version: .Net Core 3.1 I'm following the tutorial Chris Patterson published on YouTube MassTransit Starting with Mediator [this video] . The link is timestamped to where my issue occurs. NuGet Packages Installed: MassTransit.AspNetCore on the API Project, MassTransit.Analyzers 7.0.4 on the API and Components projects, and MassTransit 7.0.4 on the Components project. Issue In the Request Client's GetResponse function, I created the anonymous type to represent the message cont