Exemplo n.º 1
0
 /// <summary>
 /// Configure cluster client to use PubSub persistent streams.
 /// </summary>
 public static IClientBuilder AddPubSubStreams <TDataAdapter>(
     this IClientBuilder builder,
     string name, Action <ClusterClientPubSubStreamConfigurator <TDataAdapter> > configure)
     where TDataAdapter : IPubSubDataAdapter
 {
     configure?.Invoke(builder.AddPubSubStreams <TDataAdapter>(name));
     return(builder);
 }
 /// <summary>
 /// Configure cluster client to use PubSub persistent streams.
 /// </summary>
 public static IClientBuilder AddPubSubStreams <TDataAdapter>(
     this IClientBuilder builder,
     string name, Action <PubSubOptions> configurePubSub)
     where TDataAdapter : IPubSubDataAdapter
 {
     builder.AddPubSubStreams <TDataAdapter>(name, b => b.ConfigurePubSub(ob => ob.Configure(configurePubSub)));
     return(builder);
 }
Exemplo n.º 3
0
 public void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 {
     clientBuilder
     .AddPubSubStreams <PubSubDataAdapter>(PROVIDER_NAME, options =>
     {
         options.ProjectId = GoogleTestUtils.ProjectId;
         options.TopicId   = GoogleTestUtils.TopicId;
         options.Deadline  = TimeSpan.FromSeconds(600);
     });
 }