nservicebus-sagas

Orchestrate NServiceBus sagas with routing, persistence migrations, and tests.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/bbolek-ap/new-ai-native --skill nservicebus-sagas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nservicebus-sagas
Source: https://github.com/bbolek-ap/new-ai-native/tree/main/.claude/skills/nservicebus-sagas
Command: npx skills add https://github.com/bbolek-ap/new-ai-native --skill nservicebus-sagas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Guides the design and implementation of NServiceBus sagas across services, covering saga data, routing, persistence, compensating transactions, and testing to coordinate long-running cross-service workflows.

Core Features & Use Cases

  • Saga data design: define ContainSagaData and map correlation properties for started-by and subsequent messages.
  • Routing and persistence: configure message routing and use Fluent Migrator migrations for saga tables in a dedicated nsb schema.
  • Testing and scaffolding: provide unit and integration testing patterns and scaffolding steps for new sagas across target services.

Quick Start

Create a new saga by defining its SagaData, Saga class, routing rules, and a basic test scaffold to validate end-to-end behavior.

Frequently Asked Questions about nservicebus-sagas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design NServiceBus saga data for cross-service workflows?

To orchestrate NServiceBus sagas, you define ContainSagaData classes and map correlation properties for started-by and subsequent messages. This ensures reliable message routing across multi-service architectures.

What is the best way to configure message routing for NServiceBus sagas?

Configuring message routing for NServiceBus sagas involves specifying routing rules within the saga implementation to direct messages across services. This configuration enables reliable cross-service workflow orchestration and ensures messages reach the correct saga instances.

How do I handle persistence migrations for NServiceBus saga tables?

Handling persistence migrations for NServiceBus saga tables involves using Fluent Migrator to create schema updates. This approach applies migrations to dedicated nsb schemas, ensuring saga data persists correctly across multi-service architectures.

Can I use compensating transactions with NServiceBus sagas in multi-service architectures?

Yes, compensating transactions are supported within NServiceBus sagas to handle failures in multi-service architectures. The Skill provides guidance on compensation handling to reverse or mitigate the effects of partially completed cross-service workflows.

How do I test NServiceBus sagas across multiple services?

Testing NServiceBus sagas across services involves applying unit and integration testing patterns to validate end-to-end behavior. You can scaffold basic tests alongside SagaData and Saga class definitions to verify routing and workflow reliability.

When do I need NServiceBus sagas for cross-service orchestration?

You need NServiceBus sagas when coordinating long-running cross-service workflows that require reliable state management and message correlation. They are essential when individual services must maintain workflow state across asynchronous message exchanges.