Esempio n. 1
0
            public Producer Build(ILoggerFactory loggerFactory)
            {
                if (_kafkaProducer is null)
                {
                    _kafkaProducer = _kafkaProducerFactory(loggerFactory);
                }

                var producer = new Producer(
                    kafkaProducer: _kafkaProducer,
                    outgoingMessageRegistry: _messageRegistry,
                    messageIdGenerator: _messageIdGenerator
                    );

                producer.Name = _producerName;

                return(producer);
            }
Esempio n. 2
0
 internal Producer(KafkaProducer kafkaProducer, OutgoingMessageRegistry outgoingMessageRegistry, MessageIdGenerator messageIdGenerator)
 {
     _kafkaProducer            = kafkaProducer;
     _payloadDescriptorFactory = new PayloadDescriptorFactory(outgoingMessageRegistry, messageIdGenerator);
 }
Esempio n. 3
0
 internal OutboxProducer(KafkaProducer kafkaProducer)
 {
     _kafkaProducer = kafkaProducer;
 }