kafka printed books: kafka_2.11-0.10.0.0
Send a message kafka server command, consumers can receive,
But when the java client sends a message to consumers not receive kafka,
In kafka / config / sever.properties open to this comment
advertised.listeners = PLAINTEXT: //ip.137: 9092 # native server ip
Meaning that: hostname, port will be broadcast to the producer, consumer. If you do not have this attribute is configured, the value of listeners is used, if the value of listeners is also not configured, then use
java.net.InetAddress.getCanonicalHostName () return value (here is the return localhost).