public ConsumerFactory(EventConsumerConfiguration config) { var consumerConfig = new ConsumerConfig { GroupId = config.GroupId, BootstrapServers = config.Server }; consumer = new ConsumerBuilder <Ignore, string> (consumerConfig).Build(); }
EventConsumerConfiguration GetConsumerConfiguration() { var config = new EventConsumerConfiguration { Server = "kafkaserver", GroupId = "groupId", Topics = new List <string> { "NotificationsMicroservices", "NotificationsMicroservices", "OtterNotificationsMicroservices" } }; config.RegisterConsumer <ValidEvent, ValidEventHandler> (); config.Handlers[Utils.INVALID_EVENT_NAME] = typeof(InvalidEventHandler); return(config); }
public DummyConsumer(IConsumerFactory consumerFactory, EventConsumerConfiguration options, IServiceProvider serviceProvider, ILogger <Consumer> logger) : base(consumerFactory, options, serviceProvider, logger) { }