Ejemplo n.º 1
0
        public ConsumerFactory(EventConsumerConfiguration config)
        {
            var consumerConfig = new ConsumerConfig {
                GroupId          = config.GroupId,
                BootstrapServers = config.Server
            };

            consumer = new ConsumerBuilder <Ignore, string> (consumerConfig).Build();
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public DummyConsumer(IConsumerFactory consumerFactory, EventConsumerConfiguration options, IServiceProvider serviceProvider, ILogger <Consumer> logger)
     : base(consumerFactory, options, serviceProvider, logger)
 {
 }