Esempio n. 1
0
 public KafkaMessaging(KafkaMessagingProvider provider, string topicName,
                       IJsonSerializer serializer, ILogger <KafkaMessaging <T> > log)
 {
     this.provider   = provider;
     this.serializer = new KafkaJsonSerializer <Envelope <T> >(serializer);
     this.topicName  = topicName;
     this.log        = log;
 }
Esempio n. 2
0
        public KafkaConsumer(KafkaMessagingProvider provider, string topicName, MessageCallback <T> onMessage,
                             KafkaJsonSerializer <Envelope <T> > serializer, ILogger log)
        {
            this.provider   = provider;
            this.topicName  = topicName;
            this.onMessage  = onMessage;
            this.serializer = serializer;

            this.log = log;
        }