Module: kamailio
Branch: master
Commit: f0134bb58f30dbe9b450a0f9476f70d7eb1e3a4a
URL:
https://github.com/kamailio/kamailio/commit/f0134bb58f30dbe9b450a0f9476f70d…
Author: Vicente Hernando <vhernando(a)systemonenoc.com>
Committer: Vicente Hernando <vhernando(a)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/f0134bb58f30dbe9b450a0f9476f70d…
Patch:
https://github.com/kamailio/kamailio/commit/f0134bb58f30dbe9b450a0f9476f70d…
---
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>