mirror of https://github.com/apache/kafka.git
MINOR: add a space to separate two words
I think we should add a space here, otherwise the two words will join together. And replace the host string with a constant, otherwise when I need to modify the host, I need to modify several files. Author: 郑谦00117553 <00117553@zte.intra> Reviewers: Guozhang Wang <wangguoz@gmail.com> Closes #2132 from ZhengQian1/trunk
This commit is contained in:
parent
b902ef985a
commit
39a1c42dfc
|
@ -368,7 +368,7 @@ object KafkaConfig {
|
|||
val BrokerIdGenerationEnableDoc = s"Enable automatic broker id generation on the server. When enabled the value configured for $MaxReservedBrokerIdProp should be reviewed."
|
||||
val MaxReservedBrokerIdDoc = "Max number that can be used for a broker.id"
|
||||
val BrokerIdDoc = "The broker id for this server. If unset, a unique broker id will be generated." +
|
||||
"To avoid conflicts between zookeeper generated broker id's and user configured broker id's, generated broker ids" +
|
||||
"To avoid conflicts between zookeeper generated broker id's and user configured broker id's, generated broker ids " +
|
||||
"start from " + MaxReservedBrokerIdProp + " + 1."
|
||||
val MessageMaxBytesDoc = "The maximum size of message that the server can receive"
|
||||
val NumNetworkThreadsDoc = "the number of network threads that the server uses for handling network requests"
|
||||
|
|
|
@ -32,7 +32,7 @@ public class Consumer extends ShutdownableThread {
|
|||
public Consumer(String topic) {
|
||||
super("KafkaConsumerExample", false);
|
||||
Properties props = new Properties();
|
||||
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
|
||||
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KafkaProperties.KAFKA_SERVER_URL + ":" + KafkaProperties.KAFKA_SERVER_PORT);
|
||||
props.put(ConsumerConfig.GROUP_ID_CONFIG, "DemoConsumer");
|
||||
props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "true");
|
||||
props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "1000");
|
||||
|
|
|
@ -31,7 +31,7 @@ public class Producer extends Thread {
|
|||
|
||||
public Producer(String topic, Boolean isAsync) {
|
||||
Properties props = new Properties();
|
||||
props.put("bootstrap.servers", "localhost:9092");
|
||||
props.put("bootstrap.servers", KafkaProperties.KAFKA_SERVER_URL + ":" + KafkaProperties.KAFKA_SERVER_PORT);
|
||||
props.put("client.id", "DemoProducer");
|
||||
props.put("key.serializer", "org.apache.kafka.common.serialization.IntegerSerializer");
|
||||
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
|
||||
|
|
Loading…
Reference in New Issue