Fixed issue with producing with schema to non existing topic (#70)
Thanks! :-)
diff --git a/src/DotPulsar/Internal/ProducerChannelFactory.cs b/src/DotPulsar/Internal/ProducerChannelFactory.cs
index 7d9a1ac..57fd701 100644
--- a/src/DotPulsar/Internal/ProducerChannelFactory.cs
+++ b/src/DotPulsar/Internal/ProducerChannelFactory.cs
@@ -56,9 +56,9 @@
public async Task<IProducerChannel> Create(CancellationToken cancellationToken)
{
var connection = await _connectionPool.FindConnectionForTopic(_commandProducer.Topic, cancellationToken).ConfigureAwait(false);
- var schemaVersion = await GetSchemaVersion(connection, cancellationToken).ConfigureAwait(false);
var channel = new Channel(_correlationId, _eventRegister, new AsyncQueue<MessagePackage>());
var response = await connection.Send(_commandProducer, channel, cancellationToken).ConfigureAwait(false);
+ var schemaVersion = await GetSchemaVersion(connection, cancellationToken).ConfigureAwait(false);
return new ProducerChannel(response.ProducerId, response.ProducerName, connection, _compressorFactory, schemaVersion);
}