-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use Streaming with Aspire configured queue storage #9075
Comments
I was able to get this working for the time being using the following "hack."
In the Aspire AppHost var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var clusteringTable = storage.AddTables("clustering");
var pubSubTable = storage.AddTables("pubsub");
var grainStorage = storage.AddBlobs("grain-state");
var streamingQueue = storage.AddQueues("streaming");
var orleans = builder.AddOrleans("default")
.WithClustering(clusteringTable)
.WithGrainStorage("Default", grainStorage)
.WithGrainStorage("PubSubStore", pubSubTable);
var silo = builder.AddProject<Projects.Distributed_Host>("silo")
.WithReference(orleans)
.WithReference(streamingQueue)
.WithExternalHttpEndpoints();
builder.Build().Run(); And then in the silo project using Azure.Storage.Queues;
using Distributed.Abstractions;
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults();
builder.AddKeyedAzureTableClient("clustering");
builder.AddKeyedAzureTableClient("pubsub");
builder.AddKeyedAzureBlobClient("grain-state");
builder.AddKeyedAzureQueueClient("streaming");
builder.UseOrleans(silo =>
{
silo.AddAzureQueueStreams("AzureQueueProvider", (SiloAzureQueueStreamConfigurator configurator) =>
{
configurator.ConfigureAzureQueue(options =>
{
options.Configure<IServiceProvider>((queueOptions, sp) =>
{
queueOptions.QueueServiceClient = sp.GetKeyedService<QueueServiceClient>("streaming");
});
});
});
});
var app = builder.Build();
app.MapDefaultEndpoints();
// Configure the HTTP request pipeline.
app.UseHttpsRedirection();
app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I've attached a repo project here: https://github.com/abbottdev/orleans-aspire-repo
I'm unable to start the linked repository, I receive an start-up error I believe as the Aspire configuration/environment variable/di registration isn't quite right.
The
UseOrleans
call fails with the following stack trace:I believe the fix required here is similar to dotnet/aspire#4010 and potentially the fix for #9045 is the same that's required here for streaming.
Operating system: Windows 11
Package versions:
The text was updated successfully, but these errors were encountered: