Skip to content

Commit 3f33e9c

Browse files
Kafka-c options (#184)
Adjusted kafka-c options.
2 parents 7a8fb48 + 7453660 commit 3f33e9c

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

doc/_admin-guide/070_Destinations/100_Kafka-c/003_Kafka-c_options.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
---
2-
title: "Options of the kafka() destination's C implementation"
2+
title: "Options of the kafka-c() destination"
33
id: adm-dest-kafkac-opt
44
description: >-
5-
This section describes the options of the kafka() destination in {{ site.product.short_name }}.
5+
This section describes the options of the kafka-c() destination in {{ site.product.short_name }}.
66
---
77

8-
The C implementation of the kafka() destination of {{ site.product.short_name }} can
9-
directly publish log messages to the Apache Kafka message bus, where subscribers can access them. The C implementation of the kafka() destination has the following options.
8+
The kafka-c() destination of {{ site.product.short_name }} can
9+
directly publish log messages to the Apache Kafka message bus, where subscribers can access them. The destination has the following options.
1010

1111
## Required options
1212

13-
The following options are required: bootstrap-servers(), topic().
13+
To use the kafka-c() destination, the following two options are required: `bootstrap-servers()` and `topic()`. Both must appear at the beginning of your {{ site.product.short_name }} configuration.
14+
15+
You can specify multiple, comma-separated addresses, demonstrated in the following example:
16+
17+
```config
18+
bootstrap-servers("127.0.0.1:2525,remote-server-hostname:6464")
19+
```
1420

1521
{% include doc/admin-guide/notes/kafka-c.md %}
1622

@@ -56,8 +62,6 @@ the address to specify the port number of the server. When specifying
5662
multiple addresses, use a comma to separate the addresses, for example,
5763
bootstrap-servers(\"127.0.0.1:2525,remote-server-hostname:6464\")
5864

59-
{% include doc/admin-guide/options/client-lib-dir.md %}
60-
6165
For the kafka destination, include the path to the directory where you
6266
copied the required libraries (see [[Prerequisites|adm-dest-hdfs-pre]]), for example,
6367
**client-lib-dir("/opt/syslog-ng/lib/syslog-ng/java-modules/KafkaDestination.jar:/usr/share/kafka/lib/*.jar")**.
@@ -91,6 +95,16 @@ config(
9195

9296
{% include doc/admin-guide/options/disk-buffer.md %}
9397

98+
## fallback-topic()
99+
100+
| Type:| string|
101+
|Default:| N/A|
102+
103+
*Description:* If the resolved `topic()` template is not a valid Kafka topic , {{ site.product.short_name }} will use `fallback-topic()` to send messages.
104+
105+
**NOTE:** If instead of strings, you use actual templates (that is, a macro like `${MESSAGE}`, or a template function like `$(format-json)`) in the `topic()` option, configuring the `fallback-topic()` option is required.
106+
{: .notice--info}
107+
94108
{% include doc/admin-guide/options/frac-digits.md %}
95109

96110
## flush-timeout-on-reload()
@@ -179,9 +193,9 @@ recommends that you set sync-send() to "yes", as this setting
179193
delivers messages to the Kafka client more reliably.
180194
{: .notice--danger}
181195

182-
## template()
196+
## message()
183197

184-
| Type:| template or template function|
198+
| Type:| message template|
185199
|Default:| ${ISODATE} ${HOST} ${MSGHDR}${MSG}\\n|
186200

187201
*Description:* The message as published to Apache Kafka. You can use
@@ -196,6 +210,13 @@ For details on formatting messages in JSON format, see
196210

197211
{% include doc/admin-guide/options/time-zone.md %}
198212

213+
## time-reopen()
214+
215+
| Type:| number (seconds)|
216+
|Default:| 60|
217+
218+
*Description:* This is an optional parameter. If message delivery fails, {{ site.product.short_name }} retries sending the messages for `retries()` time (3 times by default) before waiting for `time-reopen()` time to try sending it again.
219+
199220
## topic()
200221

201222
| Type:| string|

0 commit comments

Comments
 (0)