public static ISiloBuilder ConfigurePersistentStreams(this ISiloBuilder siloBuilder, IConfiguration configuration) { var pullingPeriodConfig = configuration.ExtractClusterValue("PersistentStreamPullingPeriodMs"); if (!int.TryParse(pullingPeriodConfig, out var pullingPeriod)) { pullingPeriod = 5000; } siloBuilder .AddAzureQueueStreams(StreamProvider.Persistent, configurator => { configurator.ConfigureAzureQueue( ob => ob.Configure(options => { options.ConnectionString = configuration.GetConnectionString("AzureStorage"); options.QueueNames = new List <string> { "azurequeueprovider-0" }; })); configurator.ConfigureCacheSize(1024); configurator.ConfigurePullingAgent(ob => ob.Configure(options => { options.GetQueueMsgsTimerPeriod = TimeSpan.FromMilliseconds(pullingPeriod); })); }); return(siloBuilder); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddMemoryGrainStorage("MemoryStore", options => options.NumStorageGrains = 1) .AddAzureTableGrainStorage("AzureStore", builder => builder.Configure <IOptions <ClusterOptions> >((options, silo) => { options.ConfigureTestDefaults(); options.DeleteStateOnClear = true; })) .AddSimpleMessageStreamProvider(SmsStreamProviderName) .AddSimpleMessageStreamProvider("SMSProviderDoNotOptimizeForImmutableData", options => options.OptimizeForImmutableData = false) .AddAzureTableGrainStorage("PubSubStore", builder => builder.Configure <IOptions <ClusterOptions> >((options, silo) => { options.DeleteStateOnClear = true; options.ConfigureTestDefaults(); })) .AddAzureQueueStreams(AzureQueueStreamProviderName, b => b .ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); }))); hostBuilder .AddAzureQueueStreams("AzureQueueProvider2", b => b .ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames($"{dep.Value.ClusterId}2", queueCount); }))); }
/// <summary> /// Configure silo to use azure queue persistent streams with default settings /// </summary> public static ISiloBuilder AddAzureQueueStreams <TDataAdapter>(this ISiloBuilder builder, string name, Action <OptionsBuilder <AzureQueueOptions> > configureOptions) where TDataAdapter : IAzureQueueDataAdapter { builder.AddAzureQueueStreams <TDataAdapter>(name, b => b.ConfigureAzureQueue(configureOptions)); return(builder); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(AQStreamProviderName, ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConnectionString = TestDefaultConfiguration.DataConnectionString; })) .AddMemoryGrainStorage("PubSubStore"); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamProvider, ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); })) .AddMemoryGrainStorage("PubSubStore"); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamTestsConstants.AZURE_QUEUE_STREAM_PROVIDER_NAME, b => b.ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >((options, dep) => { options.ConnectionString = TestDefaultConfiguration.DataConnectionString; options.QueueNames = Enumerable.Range(0, 8).Select(num => $"{dep.Value.ClusterId}-{num}").ToList(); }))); hostBuilder.AddMemoryGrainStorage("PubSubStore"); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamTestsConstants.AZURE_QUEUE_STREAM_PROVIDER_NAME, ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); })) .AddMemoryGrainStorage("MemoryStore") .AddMemoryGrainStorage("PubSubStore") .AddStreamFilter <CustomStreamFilter>(StreamTestsConstants.AZURE_QUEUE_STREAM_PROVIDER_NAME); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamBatchingTestConst.ProviderName, b => { b.ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); })); b.ConfigurePullingAgent(ob => ob.Configure(options => { options.BatchContainerBatchSize = 10; })); b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly); }); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamProviderName2, ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConnectionString = TestDefaultConfiguration.DataConnectionString; options.QueueNames = AzureQueueUtilities.GenerateQueueNames($"{dep.Value.ClusterId}2", queueCount); })) .AddAzureQueueStreams(StreamProviderName, ob => ob.Configure <IOptions <ClusterOptions> >( (options, dep) => { options.ConnectionString = TestDefaultConfiguration.DataConnectionString; options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); })); hostBuilder .AddMemoryGrainStorageAsDefault() .AddMemoryGrainStorage("PubSubStore"); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(adapterName, b => { b.ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >((options, dep) => { options.ConnectionString = TestDefaultConfiguration.DataConnectionString; options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount); })); b.UseDynamicClusterConfigDeploymentBalancer(SILO_IMMATURE_PERIOD); }) .Configure <StaticClusterDeploymentOptions>(op => { op.SiloNames = new List <string>() { "Primary", "Secondary_1", "Secondary_2", "Secondary_3" }; }); hostBuilder.AddMemoryGrainStorage("PubSubStore"); }
public void Configure(ISiloBuilder hostBuilder) { hostBuilder .AddAzureQueueStreams(StreamProviderName, sb => { sb.ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >((options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames($"{dep.Value.ClusterId}{StreamProviderName}", queueCount); })); sb.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly); }) .AddAzureQueueStreams(StreamProviderName2, sb => { sb.ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >((options, dep) => { options.ConfigureTestDefaults(); options.QueueNames = AzureQueueUtilities.GenerateQueueNames($"{dep.Value.ClusterId}{StreamProviderName2}", queueCount); })); sb.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly); }) .AddMemoryGrainStorageAsDefault() .AddMemoryGrainStorage("PubSubStore"); }
/// <summary> /// Configure silo to use azure queue persistent streams with default settings /// </summary> public static ISiloBuilder AddAzureQueueStreams(this ISiloBuilder builder, string name, Action <OptionsBuilder <AzureQueueOptions> > configureOptions) { builder.AddAzureQueueStreams(name, b => b.ConfigureAzureQueue(configureOptions)); return(builder); }