Exemplo n.º 1
0
        /// <summary>
        /// Create <see cref="TestOutputTopic{K, V}"/> to be used for reading records from topic.
        /// </summary>
        /// <typeparam name="K">Key type</typeparam>
        /// <typeparam name="V">Value type</typeparam>
        /// <param name="topicName">the name of the topic</param>
        /// <param name="consumeTimeout">Consumer timeout</param>
        /// <param name="keySerdes">Key deserializer</param>
        /// <param name="valueSerdes">Value deserializer</param>
        /// <returns><see cref="TestOutputTopic{K, V}"/> instance</returns>
        public TestOutputTopic <K, V> CreateOuputTopic <K, V>(string topicName, TimeSpan consumeTimeout, ISerDes <K> keySerdes = null, ISerDes <V> valueSerdes = null)
        {
            var pipe = pipeBuilder.Output(topicName, consumeTimeout, this.topicConfiguration, this.tokenSource.Token);

            outputs.Add(topicName, pipe);
            return(new TestOutputTopic <K, V>(pipe, this.topicConfiguration, keySerdes, valueSerdes));
        }