[ 
https://issues.apache.org/jira/browse/KAFKA-8348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837118#comment-16837118
 ] 

ASF GitHub Bot commented on KAFKA-8348:
---------------------------------------

mjsax commented on pull request #6707: KAFKA-8348 document optimized
URL: https://github.com/apache/kafka/pull/6707
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Document of kafkaStreams improvement
> ------------------------------------
>
>                 Key: KAFKA-8348
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8348
>             Project: Kafka
>          Issue Type: Improvement
>          Components: documentation, streams
>            Reporter: Lifei Chen
>            Assignee: Lifei Chen
>            Priority: Minor
>
> there is an out of date and error example in kafkaStreams.java for current 
> version.
>  * Map is not supported for initial StreamsConfig properties
>  * `int` does not support `toString`
> related code:
> {code:java}
> // kafkaStreams.java
> * <p>
> * A simple example might look like this:
> * <pre>{@code
> * Properties props = new Properties();
> * props.put(StreamsConfig.APPLICATION_ID_CONFIG, 
> "my-stream-processing-application");
> * props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
> * props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, 
> Serdes.String().getClass());
> * props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, 
> Serdes.String().getClass());
> *
> * StreamsBuilder builder = new StreamsBuilder();
> * builder.<String, String>stream("my-input-topic").mapValues(value -> 
> String.valueOf(value.length())).to("my-output-topic");
> *
> * KafkaStreams streams = new KafkaStreams(builder.build(), props);
> * streams.start();
> * }</pre>{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to