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");
            }
Exemple #2
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     hostBuilder
     .AddEventHubStreams(StreamBatchingTestConst.ProviderName, 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(1);
         }));
         b.UseDynamicClusterConfigDeploymentBalancer();
         b.ConfigurePullingAgent(ob => ob.Configure(options =>
         {
             options.BatchContainerBatchSize = 10;
         }));
         b.ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly);
     });
     hostBuilder
     .AddMemoryGrainStorageAsDefault();
 }
 /// <summary>
 /// Configure silo to use event hub persistent streams with default check pointer and other settings
 /// </summary>
 public static ISiloBuilder AddEventHubStreams(
     this ISiloBuilder builder,
     string name, Action <EventHubOptions> configureEventHub, Action <AzureTableStreamCheckpointerOptions> configureDefaultCheckpointer)
 {
     builder.AddEventHubStreams(name, b =>
                                b.ConfigureEventHub(ob => ob.Configure(configureEventHub))
                                .UseEventHubCheckpointer(ob => ob.Configure(configureDefaultCheckpointer)));
     return(builder);
 }
Exemple #4
0
                public void Configure(ISiloBuilder hostBuilder)
                {
                    hostBuilder
                    .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);
                        }));
                    });

                    hostBuilder
                    .AddEventHubStreams(StreamProviderName2, b =>
                    {
                        b.ConfigureEventHub(ob => ob.Configure(options =>
                        {
                            options.ConfigureTestDefaults();
                            options.ConsumerGroup = EHConsumerGroup;
                            options.Path          = EHPath2;
                        }));
                        b.UseAzureTableCheckpointer(ob => ob.Configure(options =>
                        {
                            options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
                            options.PersistInterval  = TimeSpan.FromSeconds(10);
                        }));
                    });

                    hostBuilder
                    .AddMemoryGrainStorage("PubSubStore");
                }
 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(1);
         }));
         b.UseDynamicClusterConfigDeploymentBalancer();
         b.UseDataAdapter((s, n) => ActivatorUtilities.CreateInstance <StreamPerPartitionDataAdapter>(s));
     });
     hostBuilder
     .AddMemoryGrainStorage("PubSubStore");
 }