/// <summary> /// Create a <see cref="KStream{K, V}"/> from the specified topic. /// The default "auto.offset.reset" strategy and default <see cref="ITimestampExtractor"/> as specified in the <see cref="IStreamConfig"/> are used. /// /// Note that the specified input topic must be partitioned by key. /// If this is not the case it is the user's responsibility to repartition the data before any key based operation /// (like aggregation or join) is applied to the returned <see cref="IKStream{K, V}"/>. /// </summary> /// <typeparam name="K">Key type of record</typeparam> /// <typeparam name="V">Value type of record</typeparam> /// <param name="topic">the topic name, can't be null</param> /// <param name="keySerdes">Key deserializer</param> /// <param name="valueSerdes">Value deserializer</param> /// <param name="named">Processor name</param> /// <param name="extractor">the timestamp extractor to used. If null the default timestamp extractor from config will be used</param> /// <returns>A <see cref="IKStream{K, V}"/> for the specified topic</returns> /// <exception cref="ArgumentException">Throw <see cref="ArgumentException"/> if topic is null or empty</exception> public IKStream <K, V> Stream <K, V>(string topic, ISerDes <K> keySerdes, ISerDes <V> valueSerdes, string named, ITimestampExtractor extractor) { if (string.IsNullOrEmpty(topic)) { throw new ArgumentException("Topic of KStream must not be null or empty"); } var consumedInternal = new ConsumedInternal <K, V>(named, keySerdes, valueSerdes, extractor); return(internalStreamBuilder.Stream(topic, consumedInternal)); }
/// <summary> /// Create a <see cref="KStream{K, V}"/> from the specified topic. /// The default "auto.offset.reset" strategy and default <see cref="ITimestampExtractor"/> as specified in the <see cref="IStreamConfig"/> are used. /// /// Note that the specified input topic must be partitioned by key. /// If this is not the case it is the user's responsibility to repartition the data before any key based operation /// (like aggregation or join) is applied to the returned <see cref="IKStream{K, V}"/>. /// </summary> /// <typeparam name="K">Key type of record</typeparam> /// <typeparam name="V">Value type of record</typeparam> /// <param name="topic">the topic name, can't be null</param> /// <param name="keySerdes">Key deserializer</param> /// <param name="valueSerdes">Value deserializer</param> /// <param name="named">Processor name</param> /// <param name="extractor">the timestamp extractor to used. If null the default timestamp extractor from config will be used</param> /// <returns>A <see cref="IKStream{K, V}"/> for the specified topic</returns> public IKStream <K, V> Stream <K, V>(string topic, ISerDes <K> keySerdes, ISerDes <V> valueSerdes, string named, ITimestampExtractor extractor) { var consumedInternal = new ConsumedInternal <K, V>(named, keySerdes, valueSerdes, extractor); return(internalStreamBuilder.Stream(topic, consumedInternal)); }