Ejemplo n.º 1
0
 /// <summary>
 /// Configure cluster client to use azure queue persistent streams.
 /// </summary>
 public static IClientBuilder AddAzureQueueStreams(this IClientBuilder builder,
                                                   string name, Action <OptionsBuilder <AzureQueueOptions> > configureOptions)
 {
     builder.AddAzureQueueStreams(name, b =>
                                  b.ConfigureAzureQueue(configureOptions));
     return(builder);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Configure cluster client to use azure queue persistent streams.
 /// </summary>
 public static IClientBuilder AddAzureQueueStreams <TDataAdapter>(this IClientBuilder builder,
                                                                  string name, Action <OptionsBuilder <AzureQueueOptions> > configureOptions)
     where TDataAdapter : IAzureQueueDataAdapter
 {
     builder.AddAzureQueueStreams <TDataAdapter>(name)
     .ConfigureAzureQueue(configureOptions);
     return(builder);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Configure cluster client to use azure queue persistent streams.
 /// </summary>
 public static IClientBuilder AddAzureQueueStreams <TDataAdapter>(this IClientBuilder builder,
                                                                  string name,
                                                                  Action <ClusterClientAzureQueueStreamConfigurator <TDataAdapter> > configure)
     where TDataAdapter : IAzureQueueDataAdapter
 {
     configure?.Invoke(builder.AddAzureQueueStreams <TDataAdapter>(name));
     return(builder);
 }
 /// <summary>
 /// Configure cluster client to use azure queue persistent streams.
 /// </summary>
 public static IClientBuilder AddAzureQueueStreams <TDataAdapter>(
     this IClientBuilder builder,
     string name,
     Action <AzureQueueStreamOptions> configureOptions)
     where TDataAdapter : IAzureQueueDataAdapter
 {
     return(builder.AddAzureQueueStreams <TDataAdapter>(name, ob => ob.Configure(configureOptions)));
 }
Ejemplo n.º 5
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddAzureQueueStreams <AzureQueueDataAdapterV2>(AQStreamProviderName,
                                                     options =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
     });
 }
Ejemplo n.º 6
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddAzureQueueStreams(AQStreamProviderName, ob => ob.Configure <IOptions <ClusterOptions> >(
                               (options, dep) =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
         options.QueueNames       = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount);
     }));
 }
Ejemplo n.º 7
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddAzureQueueStreams(AQStreamProviderName, ob => ob.Configure <IOptions <ClusterOptions> >(
                               (options, dep) =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
     }))
     .Configure <SiloMessagingOptions>(options => options.ClientDropTimeout = TimeSpan.FromSeconds(5));
 }
Ejemplo n.º 8
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddAzureQueueStreams(StreamTestsConstants.AZURE_QUEUE_STREAM_PROVIDER_NAME, ob => ob.Configure <IOptions <ClusterOptions> >(
                               (options, dep) =>
     {
         options.ConfigureTestDefaults();
         options.QueueNames = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount);
     }))
     .AddStreamFilter <CustomStreamFilter>(StreamTestsConstants.AZURE_QUEUE_STREAM_PROVIDER_NAME);
 }
Ejemplo n.º 9
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddAzureQueueStreams(StreamBatchingTestConst.ProviderName, b => b
                           .ConfigureAzureQueue(ob => ob.Configure <IOptions <ClusterOptions> >(
                                                    (options, dep) =>
     {
         options.ConnectionString = TestDefaultConfiguration.DataConnectionString;
         options.QueueNames       = AzureQueueUtilities.GenerateQueueNames(dep.Value.ClusterId, queueCount);
     }))
                           .ConfigureStreamPubSub(StreamPubSubType.ImplicitOnly));
 }
Ejemplo n.º 10
0
        // public static IClientBuilder UseMqttWithAzureStorage<TDataAdapter>(this IClientBuilder builder, string name, Action<ClusterClientAzureQueueStreamConfigurator<TDataAdapter>> configure)
        //     where TDataAdapter : IAzureQueueDataAdapter
        // {
        //     var configurator = new ClusterClientAzureQueueStreamConfigurator<TDataAdapter>(name, builder);
        //     configure?.Invoke(configurator);
        //     return builder;
        // }

        public static IClientBuilder UseMqttWithAzureStorage <TDataAdapter>(this IClientBuilder builder, Action <OptionsBuilder <AzureQueueOptions> > configureOptions)
            where TDataAdapter : IAzureQueueDataAdapter
        {
            return(builder.AddAzureQueueStreams <TDataAdapter>(OrleansMqttConstants.StreamProvider, configureOptions)
                   .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IDeviceGrain).Assembly).WithReferences()));
        }