Exemplo 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);
            }
Exemplo n.º 2
0
 internal Producer(KafkaProducer kafkaProducer, OutgoingMessageRegistry outgoingMessageRegistry, MessageIdGenerator messageIdGenerator)
 {
     _kafkaProducer            = kafkaProducer;
     _payloadDescriptorFactory = new PayloadDescriptorFactory(outgoingMessageRegistry, messageIdGenerator);
 }
Exemplo n.º 3
0
 internal OutboxProducer(KafkaProducer kafkaProducer)
 {
     _kafkaProducer = kafkaProducer;
 }