private OutputTopicWrapper CreateOutputTopicWrapper()
        {
            OutputTopicWrapper ForKafka()
            {
                var client = new KafkaStreamClient(KafkaConfigForSample.BrokerList);
                var topic  = client.OpenOutputTopic(TopicConfiguration.Topic);

                return(new OutputTopicWrapper(client, topic));
            }

            OutputTopicWrapper ForMqtt()
            {
                var client = new MqttStreamClient(MqttConnectionConfigForSample.Current);
                var topic  = client.OpenOutputTopic(TopicConfiguration.Topic);

                return(new OutputTopicWrapper(client, topic));
            }

            switch (Configuration.SelectedTransport)
            {
            case StreamingTransport.Kafka:
                return(ForKafka());

            case StreamingTransport.Mqtt:
                return(ForMqtt());

            default:
                throw new NotSupportedException();
            }
        }
 public override IOutputTopic OpenOutputTopic(string topicName)
 {
     return(client.OpenOutputTopic(topicName));
 }