Esempio n. 1
0
        public RetryConsumerWorker(KafkaConfig option,
                                   ILogger <RetryConsumerWorker <TKey, TValue> > logger,
                                   IMessageHandler <TKey, TValue> messageHandler,
                                   IDeserializer <TKey> keyDersializer,
                                   IDeserializer <TValue> valueDersializer,
                                   IKafkaDependentProducer <TKey, TValue> producer) : base(option, logger, messageHandler, keyDersializer, valueDersializer)
        {
            _producer = producer;
            var retry = MessageHandler.GetType().GetCustomAttribute <RetryAttribute>();

            _maxRetry  = retry.MaxRetry;
            _retryWait = retry.Wait;

            _dlqTopic   = $"{Topic}__{option.Consumer.GroupId}__{retry.DlqPostfix}";
            _retryTopic = $"{Topic}__{option.Consumer.GroupId}__{retry.RetryPostfix}";
        }
 public DummyMessageController(ILogger <DummyMessageController> logger, IKafkaDependentProducer <Null, DummyMessage> kafkaDependentProducer)
 {
     _logger = logger;
     _kafkaDependentProducer = kafkaDependentProducer;
 }
Esempio n. 3
0
 public Worker(IKafkaDependentProducer <Null, string> stringProduer)
 {
     _stringProduer = stringProduer;
 }
Esempio n. 4
0
 public SimpleStringController(ILogger <SimpleStringController> logger, IKafkaDependentProducer <Null, string> kafkaDependentProducer)
 {
     _logger = logger;
     _kafkaDependentProducer = kafkaDependentProducer;
 }