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.

AWS local development using LocalStack

LocalStack is a tool to develop and test your AWS applications locally, reducing development time and increasing productivity.

To configure an NServiceBus endpoint to connect to LocalStack instead of AWS, the AWS endpoint URL must be set to the address of the LocalStack instance. The simplest way is by defining the AWS_ENDPOINT_URL environment variable and setting its value to the LocalStack URL:

AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566

Alternatively, configure the AWS SDK ServiceURL configuration property, like in the following example programmatically for the Amazon SQS transport:

var amazonSqsConfig = new AmazonSQSConfig();
amazonSqsConfig.ServiceURL = "http://localhost.localstack.cloud:4566";
var amazonSqsClient = new AmazonSQSClient(amazonSqsConfig);

Similarly, the Amazon SNS and DynamoDB configurations must follow the same pattern. The following snippet shows the SNS configuration:

var amazonSnsConfig = new AmazonSimpleNotificationServiceConfig();
amazonSnsConfig.ServiceURL = "http://localhost.localstack.cloud:4566";
var amazonSnsClient = new AmazonSimpleNotificationServiceClient(amazonSnsConfig);

The SQS and SNS clients are both passed to the transport when configuring the endpoint:

endpointConfiguration.UseTransport(new SqsTransport(amazonSqsClient, amazonSnsClient));

The DynamoDB configuration is shown in the following example:

var amazonDynamoDBConfig = new AmazonDynamoDBConfig();
amazonDynamoDBConfig.ServiceURL = "http://localhost.localstack.cloud:4566";
var amazonDynamoDBClient = new AmazonDynamoDBClient(amazonDynamoDBConfig);

The DynamoDB client is passed to the persistence when configuring the endpoint:

endpointConfiguration.UsePersistence<DynamoPersistence>()
    .DynamoClient(amazonDynamoDBClient);