You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/11/02 14:25:04 UTC

[camel-performance-tests] branch nats-kafka-script created (now 663e1af)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch nats-kafka-script
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git.


      at 663e1af  Updated README for Nats Kafka

This branch includes the following new commits:

     new 4447754  Added Nats-bulk script
     new 663e1af  Updated README for Nats Kafka

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[camel-performance-tests] 01/02: Added Nats-bulk script

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch nats-kafka-script
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git

commit 44477540ff1724f80bc20e68f2f20fc1fb8750f2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Nov 2 15:23:02 2021 +0100

    Added Nats-bulk script
---
 profiling/nats-kafka/scripts/nats-bulk.sh | 43 +++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/profiling/nats-kafka/scripts/nats-bulk.sh b/profiling/nats-kafka/scripts/nats-bulk.sh
new file mode 100755
index 0000000..4b3b1ab
--- /dev/null
+++ b/profiling/nats-kafka/scripts/nats-bulk.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+POSITIONAL=()
+while [[ $# -gt 0 ]]; do
+  key="$1"
+
+  case $key in
+    -n|--number)
+      NUMBER="$2"
+      shift # past argument
+      shift # past value
+      ;;
+    -b|--broker)
+      BROKER="$2"
+      shift # past argument
+      shift # past value
+      ;;
+    -t|--topic)
+      TOPIC="$2"
+      shift # past argument
+      shift # past value
+      ;;
+    -p|--payload)
+      PAYLOAD="$2"
+      shift # past argument
+      shift # past value
+      ;;
+    --default)
+      DEFAULT=YES
+      shift # past argument
+      ;;
+    *)    # unknown option
+      POSITIONAL+=("$1") # save it in an array for later
+      shift # past argument
+      ;;
+  esac
+done
+
+set -- "${POSITIONAL[@]}" # restore positional parameters
+
+for i in $(seq 1 $NUMBER)
+do nats-pub -s $BROKER $TOPIC $PAYLOAD
+done

[camel-performance-tests] 02/02: Updated README for Nats Kafka

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch nats-kafka-script
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git

commit 663e1af3aa304b91a1a628a0bd7510c7e3b63c33
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Nov 2 15:24:38 2021 +0100

    Updated README for Nats Kafka
---
 profiling/nats-kafka/README.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/profiling/nats-kafka/README.md b/profiling/nats-kafka/README.md
index ea0fb0e..8224fb2 100644
--- a/profiling/nats-kafka/README.md
+++ b/profiling/nats-kafka/README.md
@@ -132,13 +132,14 @@ In the pom you can also set a different Heap Size. The default is 64 Mb.
 
 ## Sending Messages to NATS
 
-You should use nats-pub command and run something like
+You need the nats-pub bash command installed and run
 
 ```shell script
-for i in {1..50000}; do nats-pub -s <servers> <subject_name> "Hello from Nats"; done
+./nats-bulk.sh -b 127.0.0.1 -t test.nats -p "Test" -n 50000
 ```
 
-You'll send 50000 messages to <subject_name> NATS Topic.
+
+You'll send 50000 messages to test.nats Topic with payload "Test".
 
 ## Read messages from Kafka