public KafkaProducer( IKafkaClient client, KafkaEventBus publisher) { this.publisher = publisher; this.client = client; }
public EventBusContainer( IObserverUnitContainer observerUnitContainer, IKafkaClient client) { Client = client; this.observerUnitContainer = observerUnitContainer; }
public Worker( IKafkaClient <string, string> kafkaClient, ILogger <Worker> logger) { _logger = logger; _kafkaClient = kafkaClient; }
public EventBusContainer( IServiceProvider serviceProvider, IObserverUnitContainer observerUnitContainer, IKafkaClient client) { this.serviceProvider = serviceProvider; Client = client; this.observerUnitContainer = observerUnitContainer; }
public BehaviorService(IKafkaClient kafkaClient) : base("/behaviors") { Post("/", async parameters => { Behavior behavior = this.Bind <Behavior>(); await kafkaClient.ProduceAsync("behaviors", behavior.Id.ToString(), behavior); }); }
public BalancedConsumer( IKafkaClient client, string group, string topic, int threads = DefaultNumberOfThreads) { _client = client; _group = group; _topic = topic; _threads = threads; }
public ConsumerRunner( IKafkaClient client, ILogger <ConsumerRunner> logger, KafkaConsumer consumer, string topic) { Client = client; Logger = logger; Consumer = consumer; Topic = topic; }
public ConsumerManager( ILogger <ConsumerManager> logger, IKafkaClient client, IGrainFactory grainFactory, IServiceProvider provider, IKafkaEventBusContainer kafkaEventBusContainer) { this.provider = provider; this.client = client; this.logger = logger; this.kafkaEventBusContainer = kafkaEventBusContainer; this.grainFactory = grainFactory; }
public BalancedConsumer( IKafkaClient client, string group, string topic, int threads = DefaultNumberOfThreads, bool autoCommit = true) { _client = client; _group = group; _topic = topic; _threads = threads; _autoCommit = autoCommit; }
public ConsumerRunner( IKafkaClient client, ILogger <ConsumerRunner> logger, KafkaConsumer consumer, string topic, bool reenqueue = true) { Client = client; Logger = logger; Consumer = consumer; Topic = topic; Reenqueue = reenqueue; }
public ConsumerManager( ILogger <ConsumerManager> logger, IKafkaClient client, IGrainFactory grainFactory, IServiceProvider provider) { this.provider = provider; this.client = client; this.logger = logger; this.grainFactory = grainFactory; this.queues = new List <QueueInfo>(); foreach (var assembly in AssemblyHelper.GetAssemblies(logger)) { foreach (var type in assembly.GetTypes()) { var attributes = type.GetCustomAttributes(typeof(StreamSubAttribute), false); if (attributes.Length > 0 && attributes.First() is StreamSubAttribute attribute) { foreach (var i in Enumerable.Range(0, attribute.Sharding + 1)) { var topic = i == 0 ? attribute.Name : $"{attribute.Name}_{i}"; var interfaceType = type.GetInterfaces().Where(t => typeof(IFlowActor).IsAssignableFrom(t) && !t.IsGenericType && t != typeof(IFlowActor)).FirstOrDefault(); var existQueue = this.queues.SingleOrDefault(q => q.Topic == topic && q.Group == attribute.Group); if (existQueue == default) { this.queues.Add(new QueueInfo { SubActorType = new List <Type> { interfaceType }, Topic = topic, Group = attribute.Group }); } else { existQueue.SubActorType.Add(interfaceType); } } } } } }
public App(IKafkaClient client, IOptions <AppConfig> appConfig, IEnumerable <IEventSink <KafkaMessage> > sinks) { _sinks = sinks; _appConfig = appConfig.Value; _kafkaClient = client; KafkaMessageStream = Observable.FromEvent <EventHandler <KafkaMessage>, KafkaMessage>(handler => { EventHandler <KafkaMessage> kmHandler = (sender, e) => handler(e); return(kmHandler); }, x => { _kafkaClient.OnMessageReceived += x; }, y => { _kafkaClient.OnMessageReceived -= y; }); }
public EventStream(IKafkaClient client, string topic) { this.client = client; this.topic = topic; }
public KafkaProducer(IKafkaClient client) { _producer = new DependentProducerBuilder <string, string>(client.Handle).Build(); }
public Worker(ILogger <Worker> logger, IKafkaClient <string, string> kafkaClient) { _logger = logger; this.kafkaClient = kafkaClient; }
public SimpleConsumer(IKafkaClient client, string topic, int[] partitions = null) { _client = client; _topic = topic; _partitions = partitions; }
public ProdutoProducer(IKafkaClient <string, string> kafkaClient, ILogger <ProdutoProducer> logger) { this.kafkaClient = kafkaClient; this.logger = logger; }
public Worker(IKafkaClient <string, string> kafkaClient, ILogger <Worker> logger) { this.kafkaClient = kafkaClient; _logger = logger; }
public KafkaController(IKafkaClient kafkaUtil) { this.kafkaUtil = kafkaUtil; }
public KafkaPublisher(IKafkaClient client) { _client = client; }
public EventStreamFactory(IKafkaClient client, IGrainFactory grainFactory) { this.grainFactory = grainFactory; this.client = client; }