public async Task <IProducer> CreateProducerAsync(ProducerConfiguration configuration, CancellationToken cancellationToken) { var session = await CreateSession(cancellationToken).ConfigureAwait(false); var producerBuilder = new ProducerBuilder(_loggerFactory, _transactionsManager, session, _messageIdPolicyFactory); return(await producerBuilder.CreateAsync(configuration, cancellationToken).ConfigureAwait(false)); }