FastServiceBusEmulator.Aspire.Hosting
0.5.0
dotnet add package FastServiceBusEmulator.Aspire.Hosting --version 0.5.0
NuGet\Install-Package FastServiceBusEmulator.Aspire.Hosting -Version 0.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FastServiceBusEmulator.Aspire.Hosting" Version="0.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FastServiceBusEmulator.Aspire.Hosting" Version="0.5.0" />
<PackageReference Include="FastServiceBusEmulator.Aspire.Hosting" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FastServiceBusEmulator.Aspire.Hosting --version 0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FastServiceBusEmulator.Aspire.Hosting, 0.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FastServiceBusEmulator.Aspire.Hosting@0.5.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FastServiceBusEmulator.Aspire.Hosting&version=0.5.0
#tool nuget:?package=FastServiceBusEmulator.Aspire.Hosting&version=0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Fast Azure Service Bus Emulator
A high-performance, lightweight Azure Service Bus emulator for integration testing. It implements the AMQP 1.0 protocol and mocks the Azure Service Bus behavior required by official SDKs.
Usage
var builder = DistributedApplication.CreateBuilder(args);
var serviceBus = builder.AddFastServiceBusEmulator("servicebus")
.WithTopology(new Topology
{
Queues = [
new Queue("input-queue")
{
DeadLetteringOnMessageExpiration = true,
LockDurationSeconds = 10,
MaxDeliveryCount = 3,
MaxSize = 100,
DefaultMessageTtlSeconds = 1000
}
],
Topics = [
new Topic("topic \"test\"")
{
Subscriptions = [
new Subscription("sub-1")
{
DeadLetteringOnMessageExpiration = true,
LockDurationSeconds = 10,
MaxDeliveryCount = 3,
MaxSize = 100,
DefaultMessageTtlSeconds = 1000,
Filters = [
new CorrelationFilter
{
ContentType = "application/json",
Subject = "sub-1",
MessageId = "message\\1",
To = "sub-2",
ReplyTo = "sub-3",
CorrelationId = "sub-4",
Properties = new Dictionary<string, string> {
["prop1"] = "value1"
}
}
]
},
new Subscription("sub-2")
]
},
new Topic("events")
{
Subscriptions = [
new Subscription("sub-1")
]
}
]
});
builder.AddProject<FastServiceBusEmulatorTestProject>("test-project")
.WithReference(serviceBus);
builder.Build().Run();
Endpoints
- AMQP endpoint:
serviceBus.Resource.AmqpEndpoint - Admin HTTP endpoint:
serviceBus.Resource.AdminEndpoint(default container port45672)
TestingClient
Use TestingClient with the admin endpoint to reset, inspect, and inject messages in tests.
Available methods include:
DeleteAllMessagesAsyncGetAllMessagesAsyncDeleteQueueMessagesAsync/GetQueueMessagesAsync/PostQueueMessageAsyncDeleteTopicMessagesAsync/GetTopicMessagesAsync/PostTopicMessageAsyncDeleteSubscriptionMessagesAsync/GetSubscriptionMessagesAsyncPostQueueMessageAsyncandPostTopicMessageAsync
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Aspire.Hosting (>= 13.4.4)
- StreamJsonRpc (>= 2.25.28)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.