Getting Started


The core principles of NServiceBus can be distilled to a simple API. For a deeper look into the API, check out the Quick Start Tutorial for a quick look at what NServiceBus can do, or the Messaging Basics Tutorial to really dig in and learn how NServiceBus works.


PM> Install-Package NServiceBus

Sending a message

await endpoint.Send(new SubmitOrder { OrderId = orderId });

Processing a message

public class OrdersHandler : IHandleMessages<SubmitOrder>
    public async Task Handle(SubmitOrder message, IMessageContext context)
        Console.WriteLine($"Order received {message.OrderId}");

        await context.Publish(new OrderAccepted { OrderId = message.OrderId });

Other resources

Getting Help

Last modified