AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/nservicebus/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Reply and ReplyToOriginator Differences

When building systems using the request/response pattern, the Reply method exposed by the IMessageHandlerContext is used to reply to the sender of the incoming message.

The same Reply method can be used inside a saga, and it is important to understand that the Reply method always routes the message to the sender of the incoming message, not the endpoint that started the saga.

The following diagram details a scenario where two sagas and an integration endpoint utilize the request/response pattern to communicate. The replies are highlighted in red.

Sample sequence diagram

The reason a call to Reply(new ShipOrder()) sends a message to the Shipment Gateway is that it is invoked in the context of handling the ShipmentReserved message, and the return address of ShipmentReserved is Shipment Gateway.

In the context of a Saga, it is not always clear at first glance who the sender of a message is. In the above example, when handling the expired ShipmentReservation timeout, the sender of the message is the Delivery Manager endpoint. In this case a Reply would be delivered to the Delivery Manager, and that is not necessarily the desired behavior.

Calling ReplyToOriginator makes it clear to NServiceBus that the message has to be delivered to the endpoint that was the originator of the saga.