Add .NET Aspire sample with Azurite for local Azure Storage development#546
Open
Aaronontheweb wants to merge 3 commits intopetabridge:devfrom
Open
Add .NET Aspire sample with Azurite for local Azure Storage development#546Aaronontheweb wants to merge 3 commits intopetabridge:devfrom
Aaronontheweb wants to merge 3 commits intopetabridge:devfrom
Conversation
- Add Aspire AppHost project that orchestrates Azurite emulator - Add sample Akka.NET app with persistent CounterActor demonstrating both journal (Table Storage) and snapshot store (Blob Storage) - Add README with usage instructions and architecture overview - Add MCP configuration files for AI assistant integration - Add Aspire 9.1 package versions to central package management - Update Microsoft.Extensions.Hosting to 8.0.1 for Host.CreateApplicationBuilder support
Aaronontheweb
commented
Jan 31, 2026
| <ItemGroup> | ||
| <PackageVersion Include="Akka.Hosting.TestKit" Version="$(AkkaHostingVersion)" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Hosting" Version="6.0.1" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> |
Based on user feedback, using separate WithAzureTableJournal() and WithAzureBlobsSnapshotStore() calls with endpoint-specific connection strings from Aspire is the recommended pattern. This ensures each persistence component uses its correct endpoint URL. Updated README to explain why WithAzurePersistence() with a single connection string may not work correctly with Aspire's endpoint-specific connection strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a complete .NET Aspire sample demonstrating how to use Akka.Persistence.Azure with Azurite for local development. This sample was created to investigate a user-reported bug where blob storage was incorrectly connecting to
devstoreaccount1.blob.core.windows.netinstead of the local Azurite emulator.What's Included
ReceivePersistentActorwith both journal (table) and snapshot (blob) persistenceKey Technical Details
AddAzureStorage("storage").RunAsEmulator()with.AddBlobs()and.AddTables()BlobEndpoint=andTableEndpoint=URLsTesting Results
The reported bug did NOT reproduce - when using Aspire's connection strings (which include explicit endpoint URLs), both blob and table storage connect correctly to the local Azurite emulator.
Files Added
src/samples/Aspire/README.mdsrc/samples/Aspire/.../AppHost/src/samples/Aspire/.../Sample.Aspire/Files Modified
Akka.Persistence.Azure.slnSamples/Aspirefoldersrc/Directory.Packages.propsAll sample projects have
<IsPackable>false</IsPackable>so they won't be published as NuGet packages.