Exemplo n.º 1
0
        public static ISiloBuilder UseSignalR(this ISiloBuilder builder,
                                              Action <OrleansSignalRSiloOptions> configure = null)
        {
            var siloOptions = new OrleansSignalRSiloOptions();

            configure?.Invoke(siloOptions);

            builder.AddSimpleMessageStreamProvider(OrleansSignalRConstants.StreamProviderName, options =>
            {
                options.FireAndForgetDelivery = siloOptions.FireAndForgetDelivery;
            });

            if (siloOptions.AddApplicationParts)
            {
                builder.ConfigureApplicationParts(manager =>
                                                  { manager.AddApplicationPart(typeof(ClientGrain).Assembly).WithReferences(); });
            }

            if (siloOptions.RegisterDefaultSignalRGrainStorage)
            {
                builder.AddMemoryGrainStorage(OrleansSignalRConstants.StorageProviderName);
            }

            if (siloOptions.RegisterDefaultPubSubStorage)
            {
                builder.AddMemoryGrainStorage("PubSubStore");
            }

            return(builder);
        }
Exemplo n.º 2
0
                public void Configure(ISiloBuilder hostBuilder)
                {
                    // Do use "PubSubStore" in this test

                    hostBuilder.AddMemoryStreams <DefaultMemoryMessageBodySerializer>(StreamProviderName);
                    hostBuilder.AddMemoryGrainStorage(StreamProviderName);

                    hostBuilder.AddMemoryStreams <DefaultMemoryMessageBodySerializer>(StreamProviderName2);
                    hostBuilder.AddMemoryGrainStorage(StreamProviderName2);
                }
Exemplo n.º 3
0
        private static void SetStorage(ISiloBuilder silo)
        {
            if (OrleansConfig.MongoDB.Enable)
            {
                silo.AddMongoDBGrainStorageAsDefault(op =>
                {
                    op.Configure(ooop =>
                    {
                        ooop.DatabaseName                    = OrleansConfig.MongoDB.DatabaseName + "_defaultgrain";
                        ooop.CreateShardKeyForCosmos         = OrleansConfig.MongoDB.CreateShardKeyForCosmos;
                        ooop.ConfigureJsonSerializerSettings = settings =>
                        {
                            settings.NullValueHandling      = NullValueHandling.Include;
                            settings.ObjectCreationHandling = ObjectCreationHandling.Replace;
                            settings.DefaultValueHandling   = DefaultValueHandling.Populate;
                        };
                    });
                });

                silo.AddMongoDBGrainStorage(GrainStorageKey.MongoDBStore, op =>
                {
                    op.Configure(ooop =>
                    {
                        ooop.DatabaseName                    = OrleansConfig.MongoDB.DatabaseName + "_grain";
                        ooop.CreateShardKeyForCosmos         = OrleansConfig.MongoDB.CreateShardKeyForCosmos;
                        ooop.ConfigureJsonSerializerSettings = settings =>
                        {
                            settings.NullValueHandling      = NullValueHandling.Include;
                            settings.ObjectCreationHandling = ObjectCreationHandling.Replace;
                            settings.DefaultValueHandling   = DefaultValueHandling.Populate;
                        };
                    });
                });
            }
            else
            {
                silo.AddMemoryGrainStorage(GrainStorageKey.MongoDBStore);
            }

            if (OrleansConfig.Redis.Enable)
            {
                silo.AddRedisGrainStorage(GrainStorageKey.RedisStore, optionsBuilder => optionsBuilder.Configure(options =>
                {
                    options.DataConnectionString = $"{OrleansConfig.Redis.HostName}:{OrleansConfig.Redis.Port}";
                    options.UseJson        = OrleansConfig.Redis.UseJson;
                    options.DatabaseNumber = OrleansConfig.Redis.DatabaseNumber;
                }));
            }
            else
            {
                silo.AddMemoryGrainStorage(GrainStorageKey.RedisStore);
            }
        }
            public void Configure(ISiloBuilder hostBuilder)
            {
                hostBuilder
                .AddEventHubStreams(StreamProviderName, b =>
                {
                    b.ConfigureEventHub(ob => ob.Configure(options =>
                    {
                        options.ConfigureTestDefaults(EHPath, EHConsumerGroup);
                    }));
                    b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
                    {
                        options.ConfigureTableServiceClient(TestDefaultConfiguration.DataConnectionString);
                        options.PersistInterval = TimeSpan.FromSeconds(10);
                    }));
                    b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
                });

                hostBuilder
                .AddEventHubStreams(StreamProviderName2, b =>
                {
                    b.ConfigureEventHub(ob => ob.Configure(options =>
                    {
                        options.ConfigureTestDefaults(EHPath2, EHConsumerGroup);
                    }));
                    b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
                    {
                        options.ConfigureTableServiceClient(TestDefaultConfiguration.DataConnectionString);
                        options.PersistInterval = TimeSpan.FromSeconds(10);
                    }));
                    b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
                });

                hostBuilder
                .AddMemoryGrainStorage("PubSubStore");
            }
Exemplo n.º 5
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddEventHubStreams(StreamProviderName,
                         b =>
     {
         b.ConfigureEventHub(ob => ob.Configure(options =>
         {
             options.ConfigureTestDefaults();
             options.ConsumerGroup = EHConsumerGroup;
             options.Path          = EHPath;
         }));
         b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
         {
             options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
             options.PersistInterval  = TimeSpan.FromSeconds(10);
         }));
         b.ConfigurePullingAgent(ob => ob.Configure(options =>
         {
             // sets up batching in the pulling agent
             options.BatchContainerBatchSize = 10;
         }));
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
 }
Exemplo n.º 6
0
        public static ISiloBuilder UseAppConfiguration(this ISiloBuilder siloHost, AppSiloBuilderContext context)
        {
            var appInfo = context.AppInfo;

            siloHost
            .AddMemoryGrainStorage(OrleansConstants.GrainMemoryStorage)
            .Configure <ClusterOptions>(options =>
            {
                options.ClusterId = appInfo.ClusterId;
                options.ServiceId = appInfo.Name;
            });

            if (context.HostBuilderContext.HostingEnvironment.IsDevelopment())
            {
                siloHost.UseDevelopment(context);
            }
            if (appInfo.IsDockerized)
            {
                siloHost.UseDockerSwarm(context);
            }
            else
            {
                siloHost.UseDevelopmentClustering(context);
            }

            return(siloHost);
        }
Exemplo n.º 7
0
            protected override ISiloBuilder PreBuild(ISiloBuilder builder)
            {
                OrleansFixture.GetAccountInfo(out var accountEndpoint, out var accountKey);

                var httpHandler = new HttpClientHandler()
                {
                    ServerCertificateCustomValidationCallback = (req, cert, chain, errors) => true
                };

                var dbClient = new CosmosClient(
                    accountEndpoint,
                    accountKey,
                    new CosmosClientOptions {
                    ConnectionMode = ConnectionMode.Gateway
                }
                    );

                return(builder
                       .AddMemoryGrainStorage(OrleansFixture.TEST_STORAGE)
                       .UseCosmosDBReminderService(opt =>
                {
                    opt.Client = dbClient;
                    opt.CanCreateResources = true;
                    opt.DB = DatabaseName;
                }));
            }
Exemplo n.º 8
0
 public void Configure(ISiloBuilder hostBuilder) => hostBuilder.AddMemoryGrainStorage("PubSubStore")
 .AddMemoryStreams <DefaultMemoryMessageBodySerializer>(StreamBatchingTestConst.ProviderName, b =>
 {
     b.ConfigurePartitioning(partitionCount);
     b.ConfigurePullingAgent(ob => ob.Configure(options => options.BatchContainerBatchSize = 10));
     b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
 });
Exemplo n.º 9
0
        public static ISiloBuilder UseStorage(this ISiloBuilder siloBuilder, string storeProviderName, IAppInfo appInfo, StorageProviderType?storageProvider = null, string storeName = null)
        {
            storeName = storeName.IfNullOrEmptyReturn(storeProviderName);
            storageProvider ??= _defaultProviderType;

            switch (storageProvider)
            {
            case StorageProviderType.Memory:
                siloBuilder.AddMemoryGrainStorage(storeProviderName);
                break;

            case StorageProviderType.Redis:
                siloBuilder
                .AddRedisGrainStorage(storeProviderName)
                .Build(builder =>
                       builder.Configure(ConfigureRedisOptions(storeName, appInfo))
                       );
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(storageProvider), $"Storage provider '{storageProvider}' is not supported.");
            }

            return(siloBuilder);
        }
Exemplo n.º 10
0
 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);
     })));
 }
Exemplo n.º 11
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddEventHubStreams(StreamProviderName, b =>
     {
         b.ConfigureCacheEviction(ob => ob.Configure(options =>
         {
             options.DataMaxAgeInCache      = TimeSpan.FromSeconds(5);
             options.DataMinTimeInCache     = TimeSpan.FromSeconds(0);
             options.MetadataMinTimeInCache = TimeSpan.FromMinutes(1);
         }));
         b.ConfigureEventHub(ob => ob.Configure(options =>
         {
             options.ConnectionString = TestDefaultConfiguration.EventHubConnectionString;
             options.ConsumerGroup    = EHConsumerGroup;
             options.Path             = EHPath;
         }));
         b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
         {
             options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
             options.PersistInterval  = TimeSpan.FromSeconds(10);
         }));
         b.UseDataAdapter((sp, n) => ActivatorUtilities.CreateInstance <CustomDataAdapter>(sp));
     });
 }
 public void Configure(ISiloBuilder hostBuilder) =>
 hostBuilder
 .AddMemoryGrainStorage("PubSubStore")
 .AddMemoryStreams <DefaultMemoryMessageBodySerializer>(
     StreamProviderName,
     b => b.ConfigurePartitioning(partitionCount))
 .Configure <SiloMessagingOptions>(options => options.ClientDropTimeout = TimeSpan.FromSeconds(5));
Exemplo n.º 13
0
        public static ISiloBuilder MorsteadGrainStorage(this ISiloBuilder builder, Action <MorsteadStorageConfiguration> configure, IConfiguration configuration)
        {
            var config = new MorsteadStorageConfiguration();

            configure(config);
            var connectionString = configuration["MorsteadStorage:ConnectionString"];

            if (connectionString is null)
            {
                builder.AddMemoryGrainStorage(config.Name);
                return(builder);
            }

            builder.AddAzureBlobGrainStorage(
                name: config.Name,
                configureOptions: options =>
            {
                //options.TableName = config.Name.ToLower().Replace("-", "");
                options.ContainerName = config.Name.ToLower();
                // Use JSON for serializing the state in storage
                //options.UseFullAssemblyNames = true;
                options.UseJson          = true;
                options.ConnectionString = configuration["MorsteadStorage:ConnectionString"];
            });
            return(builder);
        }
Exemplo n.º 14
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddSqsStreams(SQSStreamProviderName, (Action <Orleans.Configuration.SqsOptions>)(options =>
     {
         options.ConnectionString = AWSTestConstants.SqsConnectionString;
     }));
 }
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddSqsStreams(SQSStreamProviderName, options =>
     {
         options.ConnectionString = AWSTestConstants.DefaultSQSConnectionString;
     });
 }
Exemplo n.º 16
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddPubSubStreams <PubSubDataAdapter>(PROVIDER_NAME, options =>
     {
         options.ProjectId = GoogleTestUtils.ProjectId;
         options.TopicId   = GoogleTestUtils.TopicId;
         options.Deadline  = TimeSpan.FromSeconds(600);
     });
 }
Exemplo n.º 17
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddAzureQueueStreams(AQStreamProviderName, ob => ob.Configure <IOptions <ClusterOptions> >(
                               (options, dep) =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
         options.QueueNames       = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount);
     }));
 }
Exemplo n.º 18
0
        public static ISiloBuilder UseSignalR(this ISiloBuilder builder, Action <SignalrOrleansSiloConfigBuilder> configure = null)
        {
            var cfg = new SignalrOrleansSiloConfigBuilder();

            configure?.Invoke(cfg);

            cfg.ConfigureBuilder?.Invoke(builder, new HostBuilderConfig());

            try { builder.AddMemoryGrainStorage(Constants.PUBSUB_PROVIDER); }
            catch { /** PubSubStore was already added. Do nothing. **/ }

            try { builder.AddMemoryGrainStorage(Constants.STORAGE_PROVIDER); }
            catch { /** Grain storage provider was already added. Do nothing. **/ }

            builder.ConfigureServices(services => services.AddSingleton <IConfigurationValidator, SignalRConfigurationValidator>());

            return(builder
                   .AddSimpleMessageStreamProvider(Constants.STREAM_PROVIDER, opt => opt.FireAndForgetDelivery = cfg.UseFireAndForgetDelivery)
                   .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(ClientGrain).Assembly).WithReferences()));
        }
Exemplo n.º 19
0
        /// <summary>
        /// Adds the OrgnalR grains to the builder, and also automatically registers memory grain storage for group and user lists.
        /// This is useful for local development, however it is recommended that you add a persistent storage for:
        /// <see cref="GROUP_STORAGE_PROVIDER"/>, and <see cref="USER_STORAGE_PROVIDER"/>, and <see cref="MESSAGE_STORAGE_PROVIDER"/>
        /// Then you may use <see cref="AddOrgnalR<T>(T builder)"/> to add orgnalr using the storage providers of your choice
        /// </summary>
        /// <param name="builder">The builder to configure</param>
        /// <returns>The silo builder, configured with memory storage and grains for the OrgnalR backplane</returns>
        public static ISiloBuilder AddOrgnalRWithMemoryGrainStorage(this ISiloBuilder builder, Action <OrgnalRSiloConfig>?configure = null)
        {
            try
            {
                builder.AddMemoryGrainStorage(Constants.GROUP_STORAGE_PROVIDER);
            }
            catch { /* Do nothing, already added  */ }
            try
            {
                builder.AddMemoryGrainStorage(Constants.USER_STORAGE_PROVIDER);
            }
            catch { /* Do nothing, already added  */ }
            try
            {
                builder.AddMemoryGrainStorage(Constants.MESSAGE_STORAGE_PROVIDER);
            }
            catch { /* Do nothing, already added  */ }

            return(builder.AddOrgnalR(configure));
        }
Exemplo n.º 20
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("MemoryStore")
     .ConfigureServices(services =>
     {
         services.AddSingleton <ErrorInjectionStorageProvider>();
         services.AddSingletonNamedService <IGrainStorage, ErrorInjectionStorageProvider>("ErrorInjector");
         services.AddSingletonNamedService <IControllable, ErrorInjectionStorageProvider>("ErrorInjector");
     });
 }
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddMemoryStreams <DefaultMemoryMessageBodySerializer>(
         StreamProviderName,
         b =>
     {
         b.ConfigurePartitioning(totalQueueCount);
         b.ConfigurePartitionBalancing((s, n) => ActivatorUtilities.CreateInstance <LeaseBasedQueueBalancerForTest>(s, n));
     });
 }
Exemplo n.º 22
0
                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");
                }
Exemplo n.º 23
0
        private static ISiloBuilder UseDevelopment(this ISiloBuilder siloHost, AppSiloBuilderContext context)
        {
            siloHost
            .AddMemoryGrainStorage(OrleansConstants.PubSubStore)
            .ConfigureServices(services =>
            {
                //services.Configure<GrainCollectionOptions>(options => { options.CollectionAge = TimeSpan.FromMinutes(1.5); });
            })
            .Configure <ClusterMembershipOptions>(options => options.ExpectedClusterSize = 1);

            return(siloHost);
        }
Exemplo n.º 24
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddMemoryStreams <DefaultMemoryMessageBodySerializer>(StreamProviderName, b =>
     {
         b.ConfigureCacheEviction(ob => ob.Configure(options =>
         {
             options.DataMaxAgeInCache  = TimeSpan.FromSeconds(5);
             options.DataMinTimeInCache = TimeSpan.FromSeconds(0);
         }));
     });
 }
Exemplo n.º 25
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("MemoryStore", op => op.NumStorageGrains = 1)
     .AddMemoryGrainStorage("PubSubStorage")
     .AddSimpleMessageStreamProvider("SMSProvider")
     .AddPubSubStreams <PubSubDataAdapter>(PUBSUB_STREAM_PROVIDER_NAME, b =>
                                           b.ConfigurePubSub(ob => ob.Configure(options =>
     {
         options.ProjectId = GoogleTestUtils.ProjectId;
         options.TopicId   = GoogleTestUtils.TopicId;
         options.Deadline  = TimeSpan.FromSeconds(600);
     })));
 }
Exemplo n.º 26
0
        public static void AddPubSub(this ISiloBuilder siloBuilder)
        {
            siloBuilder.AddPlacementDirector <LocalPlacementStrategy, LocalPlacementDirector>();

            siloBuilder.ConfigureServices(services =>
            {
                services.AddSingleton <OrleansStreamingPubSub>();
                services.AddSingleton <IPubSub>(c => c.GetRequiredService <OrleansStreamingPubSub>());
            });

            siloBuilder.AddSimpleMessageStreamProvider(Constants.StreamProviderName);
            siloBuilder.AddMemoryGrainStorage("PubSubStore");

            siloBuilder.AddStartupTask <OrleansStreamingPubSub>();
        }
Exemplo n.º 27
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddEventDataGeneratorStreams(
         StreamProviderName,
         b =>
     {
         b.Configure <EventDataGeneratorStreamOptions>(ob => ob.Configure(
                                                           options =>
         {
             options.EventHubPartitionCount = TotalQueueCount;
         }));
         b.ConfigurePartitionBalancing((s, n) => ActivatorUtilities.CreateInstance <LeaseBasedQueueBalancerForTest>(s, n));
     });
 }
Exemplo n.º 28
0
 public void Configure(ISiloBuilder siloBuilder)
 {
     siloBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddRabbitMqStream(Globals.StreamProviderNameDefault, configurator =>
     {
         configurator.ConfigureRabbitMq(ob =>
                                        ob.Configure(options =>
         {
             options.QueueNamePrefix = Globals.StreamNameSpaceDefault;
             options.NumberOfQueues  = CustomQueueNames.Count;
         }));
         configurator.ConfigureCacheSize(100);
         configurator.ConfigureTopologyProvider(CustomNameTopologyProvider.Create);
     })
     .ConfigureLogging(log => log.AddTestDebugLogging());
 }
 public void Configure(ISiloBuilder siloBuilder)
 {
     siloBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddRabbitMqStream(Globals.StreamProviderNameDefault, configurator =>
     {
         configurator.ConfigureRabbitMq(ob =>
                                        ob.Configure(options =>
         {
             options.Connection.Port      = ToxiProxyHelpers.ClientPort;
             options.QueueNamePrefix      = Globals.StreamNameSpaceDefault;
             options.UseQueuePartitioning = false;
         }));
         configurator.ConfigureCacheSize(100);
         configurator.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
         configurator.ConfigurePullingAgent(ob => ob.Configure(
                                                options =>
         {
             options.GetQueueMsgsTimerPeriod = TimeSpan.FromMilliseconds(100);
         }));
     })
     .AddRabbitMqStream(Globals.StreamProviderNameProtoBuf, configurator =>
     {
         configurator.ConfigureQueueDataAdapter(ProtoBufDataAdapter.Create);
         configurator.ConfigureRabbitMq(ob =>
                                        ob.Configure(options =>
         {
             options.Connection.Port      = ToxiProxyHelpers.ClientPort;
             options.QueueNamePrefix      = Globals.StreamNameSpaceProtoBuf;
             options.UseQueuePartitioning = false;
         }));
         configurator.ConfigureCacheSize(100);
         configurator.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
         configurator.ConfigurePullingAgent(ob => ob.Configure(
                                                options =>
         {
             options.GetQueueMsgsTimerPeriod = TimeSpan.FromMilliseconds(100);
         }));
     })
     .Configure <SiloMessagingOptions>(options =>
     {
         options.ResponseTimeout = TimeSpan.FromMinutes(5);
     })
     .ConfigureLogging(log => log.AddTestDebugLogging());
 }
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore")
     .AddEventHubStreams(StreamProviderName, b =>
     {
         b.ConfigureEventHub(ob => ob.Configure(options =>
         {
             options.ConfigureTestDefaults(EHPath, EHConsumerGroup);
         }));
         b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
         {
             options.ConfigureTableServiceClient(TestDefaultConfiguration.DataConnectionString);
             options.PersistInterval = TimeSpan.FromSeconds(1);
         }));
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
 }