diff --git a/bin/kafka-console-consumer b/bin/kafka-console-consumer index c9d25bc..03d874b 120000 --- a/bin/kafka-console-consumer +++ b/bin/kafka-console-consumer @@ -1 +1 @@ -run-cli-tool-with-kafka-bootstrap-server \ No newline at end of file +run-cli-tool-with-kafka-bootstrap-server-consumer \ No newline at end of file diff --git a/bin/kafka-console-producer b/bin/kafka-console-producer index 7d7f655..c471b61 120000 --- a/bin/kafka-console-producer +++ b/bin/kafka-console-producer @@ -1 +1 @@ -run-cli-tool-with-kafka-broker-list \ No newline at end of file +run-cli-tool-with-kafka-broker-list-producer \ No newline at end of file diff --git a/bin/kafka-consumer-perf-test b/bin/kafka-consumer-perf-test index 7d7f655..7b3e840 120000 --- a/bin/kafka-consumer-perf-test +++ b/bin/kafka-consumer-perf-test @@ -1 +1 @@ -run-cli-tool-with-kafka-broker-list \ No newline at end of file +run-cli-tool-with-kafka-broker-list-consumer \ No newline at end of file diff --git a/bin/kafka-streams-application-reset b/bin/kafka-streams-application-reset index 948c4df..cedfe94 100755 --- a/bin/kafka-streams-application-reset +++ b/bin/kafka-streams-application-reset @@ -1,4 +1,4 @@ #!/bin/bash BOOTSTRAP_SERVERS_PARAM="--bootstrap-servers" -TLS_CONFIG_PARAM="--command-config" +TLS_CONFIG_PARAM="--config-file" source $(dirname $0)/run-kafka-cli-tool.sh diff --git a/bin/kafka-verifiable-consumer b/bin/kafka-verifiable-consumer index 7d7f655..7b3e840 120000 --- a/bin/kafka-verifiable-consumer +++ b/bin/kafka-verifiable-consumer @@ -1 +1 @@ -run-cli-tool-with-kafka-broker-list \ No newline at end of file +run-cli-tool-with-kafka-broker-list-consumer \ No newline at end of file diff --git a/bin/kafka-verifiable-producer b/bin/kafka-verifiable-producer index 7d7f655..c471b61 120000 --- a/bin/kafka-verifiable-producer +++ b/bin/kafka-verifiable-producer @@ -1 +1 @@ -run-cli-tool-with-kafka-broker-list \ No newline at end of file +run-cli-tool-with-kafka-broker-list-producer \ No newline at end of file diff --git a/bin/run-cli-tool-with-kafka-bootstrap-server-consumer b/bin/run-cli-tool-with-kafka-bootstrap-server-consumer new file mode 100755 index 0000000..2443d6d --- /dev/null +++ b/bin/run-cli-tool-with-kafka-bootstrap-server-consumer @@ -0,0 +1,4 @@ +#!/bin/bash +BOOTSTRAP_SERVERS_PARAM="--bootstrap-server" +TLS_CONFIG_PARAM="--consumer.config" +source $(dirname $0)/run-kafka-cli-tool.sh diff --git a/bin/run-cli-tool-with-kafka-broker-list b/bin/run-cli-tool-with-kafka-broker-list-consumer similarity index 79% rename from bin/run-cli-tool-with-kafka-broker-list rename to bin/run-cli-tool-with-kafka-broker-list-consumer index 343eb0d..72ab4b5 100755 --- a/bin/run-cli-tool-with-kafka-broker-list +++ b/bin/run-cli-tool-with-kafka-broker-list-consumer @@ -4,6 +4,6 @@ DIR=$( dirname "${BASH_SOURCE[0]}" ) source "$DIR/utils.sh" PARAMS=$(add_bootstrap_servers "$PARAMS" "--broker-list") -PARAMS=$(add_tls "$PARAMS" "--config-file") +PARAMS=$(add_tls "$PARAMS" "--consumer.config") exec $KAFKA_CLI_DIR/$(basename $0).sh $PARAMS diff --git a/bin/run-cli-tool-with-kafka-broker-list-producer b/bin/run-cli-tool-with-kafka-broker-list-producer new file mode 100755 index 0000000..58a5c7d --- /dev/null +++ b/bin/run-cli-tool-with-kafka-broker-list-producer @@ -0,0 +1,9 @@ +#!/bin/bash +PARAMS="$@" +DIR=$( dirname "${BASH_SOURCE[0]}" ) +source "$DIR/utils.sh" + +PARAMS=$(add_bootstrap_servers "$PARAMS" "--broker-list") +PARAMS=$(add_tls "$PARAMS" "--producer.config") + +exec $KAFKA_CLI_DIR/$(basename $0).sh $PARAMS diff --git a/bin/test-toolbox.sh b/bin/test-toolbox.sh index e2826f1..98c4dae 100755 --- a/bin/test-toolbox.sh +++ b/bin/test-toolbox.sh @@ -9,7 +9,7 @@ function test_script { echo -e -n "\b" - if [ -z "$(cat /tmp/err)" ] || [ "$(cat /tmp/err)" != "Processed a total of 2 messages\n" ] ; then + if [ -z "$(cat /tmp/err)" ] || [ "$(cat /tmp/err)" == "Processed a total of 2 messages\n" ] ; then echo -e "${bold}${green}✓${normal}" else echo -e "${bold}${red}✗${normal}" diff --git a/bin/utils.sh b/bin/utils.sh index 4594442..c6b424c 100644 --- a/bin/utils.sh +++ b/bin/utils.sh @@ -120,7 +120,7 @@ function add_tls() { echo "ssl.truststore.location: $TRUSTSTORE_LOCATION" >> $CONFIG_FILE echo "ssl.truststore.password: $KEYSTORE_PASSWORD" >> $CONFIG_FILE - add_param_from_env $CONFIG_FILE "$PARAM" "$PARAMS" + PARAMS=$(add_param_from_env $CONFIG_FILE "$PARAM" "$PARAMS") fi echo "$PARAMS" }