Exemplo n.º 1
0
        public IClientBuilder Build()
        {
            _hostBuilder.AddKafkaStreamProvider(
                _providerName,
                options => _configure?.Invoke(options)
                );

            return(_hostBuilder);
        }
Exemplo n.º 2
0
 public virtual void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 => clientBuilder
 .AddKafkaStreamProvider(Consts.KafkaStreamProvider, options =>
 {
     options.BrokerList = new List <string> {
         "localhost:9092"
     };
     options.ConsumerGroupId = "E2EGroup";
     options.Topics          = new List <string> {
         Consts.StreamNamespace, Consts.StreamNamespace2
     };
     options.PollTimeout = TimeSpan.FromMilliseconds(10);
     options.ExternalMessageIdentifier = "x-external-message";
     options.ConsumeMode = ConsumeMode.StreamEnd;
 })
 .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(RoundTripGrain).Assembly).WithReferences());
Exemplo n.º 3
0
 public virtual void Configure(IConfiguration configuration, IClientBuilder clientBuilder)
 => clientBuilder
 .AddKafkaStreamProvider(Consts.KafkaStreamProvider, options =>
 {
     options.BrokerList = new List <string> {
         "pkc-l9pve.eu-west-1.aws.confluent.cloud:9092"
     };
     options.ConsumerGroupId = "TestGroup";
     options.Topics          = new List <string> {
         Consts.StreamNamespace, Consts.StreamNamespace2
     };
     options.PollTimeout = TimeSpan.FromMilliseconds(10);
     options.ExternalMessageIdentifier = "x-external-message";
     options.ConsumeMode = ConsumeMode.StreamEnd;
     options.WithConfluentCloudOptions(new Credentials
     {
         UserName = Environment.GetEnvironmentVariable("userName"),
         Password = Environment.GetEnvironmentVariable("password"),
     });
 })
 .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(RoundTripGrain).Assembly).WithReferences());