[sr-dev] git:master:f0134bb5: kafka: doc about kafka_send_key function.

Vicente Hernando vhernando at systemonenoc.com
Wed May 20 14:02:37 CEST 2020


Module: kamailio
Branch: master
Commit: f0134bb58f30dbe9b450a0f9476f70d7eb1e3a4a
URL: https://github.com/kamailio/kamailio/commit/f0134bb58f30dbe9b450a0f9476f70d7eb1e3a4a

Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date: 2020-05-20T13:59:04+02:00

kafka: doc about kafka_send_key function.

---

Modified: src/modules/kafka/doc/kafka_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/f0134bb58f30dbe9b450a0f9476f70d7eb1e3a4a.diff
Patch: https://github.com/kamailio/kamailio/commit/f0134bb58f30dbe9b450a0f9476f70d7eb1e3a4a.patch

---

diff --git a/src/modules/kafka/doc/kafka_admin.xml b/src/modules/kafka/doc/kafka_admin.xml
index 09c0eaf8c6..34ae1cf58c 100644
--- a/src/modules/kafka/doc/kafka_admin.xml
+++ b/src/modules/kafka/doc/kafka_admin.xml
@@ -185,6 +185,40 @@ modparam("kafka", "topic", "name=third_topic")
 ...
 # Send "test message" to topic "my_topic"			
 kafka_send("my_topic", "test message");
+...
+		  </programlisting>
+		</example>
+	  </section>
+	  <section id="kafka.f.kafka_send_key">
+		<title>
+		  <function moreinfo="none">kafka_send_key(topic, msg, key)</function>
+		</title>
+		<para>
+		  Send a message with an associated key to a specific topic via Kafka server.
+		</para>
+		<para>
+		  This function returns -1 for all sort of errors. (So execution of script continues)
+		</para>
+		<para>
+		  Parameters:
+		  <itemizedlist>
+			<listitem><emphasis>topic</emphasis>: (string) name of the topic.
+			It is mandatory.</listitem>
+			<listitem><emphasis>msg</emphasis>: (string) message to send.
+			It is mandatory.</listitem>
+			<listitem><emphasis>key</emphasis>: (string) associate this key with the message.
+			It is mandatory.</listitem>
+		  </itemizedlist>
+		</para>
+		<para>
+		  Available via KEMI framework as <emphasis>kafka.send_key</emphasis>.
+		</para>
+		<example>
+		  <title><function>kafka_send_key</function> usage</title>
+		  <programlisting format="linespecific">
+...
+# Send "test message" to topic "my_topic" with key "my_key"			
+kafka_send_key("my_topic", "test message", "my_key");
 ...
 		  </programlisting>
 		</example>




More information about the sr-dev mailing list