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.

Unobtrusive Mode Messages

Unobtrusive mode uses custom message conventions to identify messages, commands, and events instead of marker interfaces. Conventions can also configure related features, including time to be received, data bus, and property encryption.

For new message contracts with NServiceBus 8 or later, prefer the marker interfaces in the NServiceBus.MessageInterfaces package. The package avoids a dependency on the NServiceBus assembly while retaining explicit message markers, and supports sharing message assemblies across major NServiceBus versions and .NET target frameworks. See the sharing message assemblies sample.

Use unobtrusive message conventions when existing message types cannot implement marker interfaces or when conventions are needed for other features. See conventions for configuration details.

List of Samples

  • Sharing message assemblies
    Demonstrate how the NServiceBus.MessageInterfaces package enables message assemblies to be shared across major versions of NServiceBus.

Related Articles

  • Conventions
    Custom conventions for defining how certain types are detected and to support unobtrusive mode.
  • Messages, events, and commands
    Messages as commands or events are the the unit of communication for message-based distributed systems. NServiceBus ensures they are used correctly.