public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddPersistentStreams(
         StreamProviderName,
         ControllableTestAdapterFactory.Create,
         b =>
     {
         b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
 }
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddPersistentStreams(StreamProviderName,
                           GeneratorAdapterFactory.Create,
                           b =>
     {
         b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
         b.Configure <HashRingStreamQueueMapperOptions>(ob => ob.Configure(options => options.TotalQueueCount = TotalQueueCount));
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
 }
Esempio n. 3
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder.AddPersistentStreams(
         StreamProviderName,
         EHStreamProviderWithCreatedCacheListAdapterFactory.Create,
         b =>
     {
         b.Configure <EventHubStreamCachePressureOptions>(ob => ob.Configure(options =>
         {
             options.SlowConsumingMonitorPressureWindowSize            = monitorPressureWindowSize;
             options.SlowConsumingMonitorFlowControlThreshold          = flowControlThredhold;
             options.AveragingCachePressureMonitorFlowControlThreshold = null;
         }));
         b.ConfigureComponent <IStreamQueueCheckpointerFactory>((s, n) => NoOpCheckpointerFactory.Instance);
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
     hostBuilder.AddMemoryGrainStorage("PubSubStore");
 }
Esempio n. 4
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddPersistentStreams(
         StreamProviderName,
         EHStreamProviderForMonitorTestsAdapterFactory.Create,
         b =>
     {
         b.ConfigureComponent <IStreamQueueCheckpointerFactory>((s, n) => NoOpCheckpointerFactory.Instance);
         b.Configure <StreamStatisticOptions>(ob => ob.Configure(options => options.StatisticMonitorWriteInterval = monitorWriteInterval));
         b.UseDynamicClusterConfigDeploymentBalancer();
     });
     hostBuilder
     .ConfigureServices(services =>
     {
         services.AddTransientNamedService <Func <StreamId, IStreamDataGenerator <EventData> > >(StreamProviderName, (s, n) => SimpleStreamEventDataGenerator.CreateFactory(s));
     })
     .AddMemoryGrainStorage("PubSubStore");
 }
Esempio n. 5
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddPersistentStreams(StreamProviderName, TestEventHubStreamAdapterFactory.Create, b =>
     {
         b.Configure <SiloMessagingOptions>(ob => ob.Configure(options => options.ClientDropTimeout = TimeSpan.FromSeconds(5)));
         b.Configure <EventHubOptions>(ob => ob.Configure(options =>
         {
             options.ConfigureTestDefaults(EHPath, EHConsumerGroup);
         }));
         b.ConfigureComponent <AzureTableStreamCheckpointerOptions, IStreamQueueCheckpointerFactory>(
             EventHubCheckpointerFactory.CreateFactory,
             ob => ob.Configure(options =>
         {
             options.ConfigureTableServiceClient(TestDefaultConfiguration.DataConnectionString);
             options.PersistInterval = TimeSpan.FromSeconds(10);
         }));
     })
     .AddMemoryGrainStorage("PubSubStore")
     .ConfigureServices(services => services.TryAddSingleton <IEventHubDataAdapter, EventHubDataAdapter>());
 }