microsoft / microsoft/aspire

Service Bus Emulator doesn't respect persistent lifetime

Open
#14,466 7 comments 2 reactions 0 assignees View on GitHub
area-app-model
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

> I still experience Service Bus Emulator restarting every time I start my Aspire App Host. I add it to my app host like this:
>
> ```csharp
> builder.AddAzureServiceBus("servicebus")
> .RunAsEmulator(emulator => emulator
> .WithConfigurationFile("./sb-emulator-config.json")
> .WithLifetime(ContainerLifetime.Persistent));
> ```
>
> In the console logs, I see the following message every time I restart the app host:
>
> ```log
> [sys] Found existing Container, but calculated lifecycle key doesn't match: ContainerName = (..), ContainerId = (..)
> ```
>
> The exact reason why the lifecycle key never matches is beyond me, but it triggers a restart of the emulator, significantly slowing down my development loop.

_Originally posted by @tormodfj in [#7278](https://github.com/dotnet/aspire/issues/7278#issuecomment-3891199924)_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.