in src/DotPulsar/Internal/ProducerChannelFactory.cs [31:61]
public ProducerChannelFactory(
Guid correlationId,
IRegisterEvent eventRegister,
IConnectionPool connectionPool,
string topic,
string? producerName,
ProducerAccessMode producerAccessMode,
SchemaInfo schemaInfo,
ICompressorFactory? compressorFactory,
Dictionary<string, string>? properties)
{
_correlationId = correlationId;
_eventRegister = eventRegister;
_connectionPool = connectionPool;
_schema = schemaInfo.PulsarSchema;
_commandProducer = new CommandProducer
{
ProducerName = producerName,
ProducerAccessMode = producerAccessMode,
Topic = topic
};
if (_schema.Type != Schema.SchemaType.None)
_commandProducer.Schema = _schema;
if (properties is not null)
_commandProducer.Metadatas.AddRange(properties.Select(x => new KeyValue { Key = x.Key, Value = x.Value }));
_compressorFactory = compressorFactory;
}