Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit adc27dc

Browse files
authoredApr 22, 2022
Update apache-domain-joined-run-kafka.md
replace unrecognized --security-protocol option with --producer-property and --consumer-property
1 parent 77843bc commit adc27dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎articles/hdinsight/domain-joined/apache-domain-joined-run-kafka.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ To produce and consume topics in ESP Kafka by using the console:
199199
3. Produce messages to topic `salesevents`:
200200

201201
```bash
202-
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --topic salesevents --broker-list $KAFKABROKERS --security-protocol SASL_PLAINTEXT
202+
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --topic salesevents --broker-list $KAFKABROKERS --producer-property security.protocol=SASL_PLAINTEXT
203203
```
204204

205205
4. Consume messages from topic `salesevents`:
206206

207207
```bash
208-
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --topic salesevents --from-beginning --bootstrap-server $KAFKABROKERS --security-protocol SASL_PLAINTEXT
208+
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --topic salesevents --from-beginning --bootstrap-server $KAFKABROKERS --consumer-property security.protocol=SASL_PLAINTEXT
209209
```
210210

211211
## Produce and consume topics for long running session in ESP Kafka
@@ -238,8 +238,8 @@ To use keytab in long running session without `kinit`:
238238
239239
# console tool
240240
export KAFKA_OPTS="-Djava.security.auth.login.config=/home/sshuser/kafka_client_jaas.conf"
241-
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --topic salesevents --broker-list $KAFKABROKERS --security-protocol SASL_PLAINTEXT
242-
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --topic salesevents --from-beginning --bootstrap-server $KAFKABROKERS --security-protocol SASL_PLAINTEXT
241+
/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --topic salesevents --broker-list $KAFKABROKERS --producer-property security.protocol=SASL_PLAINTEXT
242+
/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --topic salesevents --from-beginning --bootstrap-server $KAFKABROKERS --consumer-property security.protocol=SASL_PLAINTEXT
243243
244244
# API
245245
java -jar -Djava.security.auth.login.config=/home/sshuser/kafka_client_jaas.conf kafka-producer-consumer.jar producer salesevents $KAFKABROKERS

0 commit comments

Comments
 (0)
Please sign in to comment.