Tutorial
1. Define the message contract
public record OrderCreated(string Id, string ProductId, int Quantity);2. Register the message type and configure MassTransit
builder.Services.AddElsa(elsa => elsa
.UseMassTransit(massTransit =>
{
massTransit.AddMessageType<OrderCreated>();
// Use a broker for cross-process messaging.
massTransit.UseRabbitMq(rabbitMqConnectionString);
}));3. Start a workflow when the message arrives
4. Publish the message from a workflow
When to Use This Pattern
Last updated