Skip to content

Commit

Permalink
[#2601] Change Kafka ports in Kafka messaging guide.
Browse files Browse the repository at this point in the history
The external Kafka port used by the Hono Helm chart has been changed from
9094 to 9092. This adapts the Kafka messaging guide accordingly.

Signed-off-by: Abel Buechner-Mihaljevic <[email protected]>
  • Loading branch information
b-abel committed Aug 5, 2021
1 parent 635464e commit f529049
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/homepage/content/getting-started-kafka/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ are using the Sandbox server (make sure to replace `my-tenant` with your tenant
# in directory where the hono-cli-*-exec.jar file has been downloaded to
export MY_TENANT=my-tenant
export KAFKA_IP=hono.eclipseprojects.io
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9094 --hono.kafka.commonClientConfig.security.protocol=SASL_PLAINTEXT --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=receiver,kafka --tenant.id=$MY_TENANT
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9092 --hono.kafka.commonClientConfig.security.protocol=SASL_PLAINTEXT --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=receiver,kafka --tenant.id=$MY_TENANT
~~~

Otherwise, if you are using a local Minikube cluster, first save the truststore file of the Kafka broker to your file
Expand All @@ -251,7 +251,7 @@ and then start the client (make sure to replace `my-tenant`):
# in directory where the hono-cli-*-exec.jar file has been downloaded to
export MY_TENANT=my-tenant
export KAFKA_IP=$(kubectl get service eclipse-hono-kafka-0-external --output="jsonpath={.status.loadBalancer.ingress[0]['hostname','ip']}" -n hono)
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9094 --hono.kafka.commonClientConfig.security.protocol=SASL_SSL --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=receiver,kafka --tenant.id=$MY_TENANT --hono.kafka.commonClientConfig.ssl.truststore.location=$KAFKA_TRUSTSTORE_PATH --hono.kafka.commonClientConfig.ssl.truststore.password=honotrust --hono.kafka.commonClientConfig.ssl.endpoint.identification.algorithm=""
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9092 --hono.kafka.commonClientConfig.security.protocol=SASL_SSL --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=receiver,kafka --tenant.id=$MY_TENANT --hono.kafka.commonClientConfig.ssl.truststore.location=$KAFKA_TRUSTSTORE_PATH --hono.kafka.commonClientConfig.ssl.truststore.password=honotrust --hono.kafka.commonClientConfig.ssl.endpoint.identification.algorithm=""
~~~

## Publishing Telemetry Data to the HTTP Adapter
Expand Down Expand Up @@ -355,15 +355,15 @@ If you are using the Sandbox server (don't forget to set the environment variabl

~~~sh
# in directory where the hono-cli-*-exec.jar file has been downloaded to
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9094 --hono.kafka.commonClientConfig.security.protocol=SASL_PLAINTEXT --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=command,kafka --tenant.id=$MY_TENANT --device.id=$MY_DEVICE
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9092 --hono.kafka.commonClientConfig.security.protocol=SASL_PLAINTEXT --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=command,kafka --tenant.id=$MY_TENANT --device.id=$MY_DEVICE
~~~

Otherwise, if you are using a local Minikube cluster (don't forget to set the environment variables `KAFKA_IP`,
`KAFKA_TRUSTSTORE_PATH`, `MY_TENANT` and `MY_DEVICE`):

~~~sh
# in directory where the hono-cli-*-exec.jar file has been downloaded to
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9094 --hono.kafka.commonClientConfig.security.protocol=SASL_SSL --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=command,kafka --tenant.id=$MY_TENANT --device.id=$MY_DEVICE --hono.kafka.commonClientConfig.ssl.truststore.location=$KAFKA_TRUSTSTORE_PATH --hono.kafka.commonClientConfig.ssl.truststore.password=honotrust --hono.kafka.commonClientConfig.ssl.endpoint.identification.algorithm=""
java -jar hono-cli-*-exec.jar --hono.kafka.commonClientConfig.bootstrap.servers=$KAFKA_IP:9092 --hono.kafka.commonClientConfig.security.protocol=SASL_SSL --hono.kafka.commonClientConfig.sasl.jaas.config="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"hono\" password=\"hono-secret\";" --hono.kafka.commonClientConfig.sasl.mechanism=SCRAM-SHA-512 --spring.profiles.active=command,kafka --tenant.id=$MY_TENANT --device.id=$MY_DEVICE --hono.kafka.commonClientConfig.ssl.truststore.location=$KAFKA_TRUSTSTORE_PATH --hono.kafka.commonClientConfig.ssl.truststore.password=honotrust --hono.kafka.commonClientConfig.ssl.endpoint.identification.algorithm=""
~~~

Note that this time the profile `command` is activated instead of `receiver`, which enables a different mode of the Command Line Client.
Expand Down

0 comments on commit f529049

Please sign in to comment.