Skip to content

Commit a1121be

Browse files
docs: update Kafkacat to Kcat (#595)
* docs: update quick start to kcat and apply style updates * docs: update remaining references to kafkacat * docs: minor text updates * docs: address peer review feedback
1 parent 0145cda commit a1121be

File tree

5 files changed

+70
-77
lines changed

5 files changed

+70
-77
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* link:./docs/kafka/getting-started-kafka[Getting started with {product-long-kafka}]
1010
* link:./docs/kafka/rhoas-cli-getting-started-kafka[Getting started with the rhoas CLI for {product-long-kafka}]
1111
* link:./docs/kafka/quarkus-kafka[Using Quarkus applications with Kafka instances in {product-long-kafka}]
12-
* link:./docs/kafka/kcat-kafka[Configuring and connecting Kafkacat with {product-long-kafka}]
12+
* link:./docs/kafka/kcat-kafka[Configuring and connecting Kcat with {product-long-kafka}]
1313
* link:./docs/kafka/kafka-bin-scripts-kafka[Configuring and connecting Kafka scripts with {product-long-kafka}]
1414
* link:./docs/kafka/access-mgmt-kafka[Managing account access in {product-long-kafka}]
1515
* link:./docs/kafka/service-binding-kafka[Binding OpenShift applications to {product-long-kafka}]

docs/kafka/getting-started-kafka/README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ endif::[]
346346
* https://access.redhat.com/documentation/en-us/red_hat_openshift_streams_for_apache_kafka/1/guide/7d28aec8-e146-44db-a4a5-fafc1f426ca5[Configuring topics in {product-long-kafka}^]
347347
* {base-url}{getting-started-rhoas-cli-url-kafka}[Getting started with the rhoas CLI for {product-long-kafka}^]
348348
* {base-url-cli}{command-ref-url-cli}[CLI command reference (rhoas)^]
349-
* {base-url}{kafkacat-url-kafka}[Configuring and connecting Kafkacat with {product-long-kafka}^]
349+
* {base-url}{kafkacat-url-kafka}[Configuring and connecting Kcat with {product-long-kafka}^]
350350
* {base-url}{kafka-bin-scripts-url-kafka}[Configuring and connecting Kafka scripts with {product-long-kafka}^]
351351
* {base-url}{quarkus-url-kafka}[Using Quarkus applications with Kafka instances in {product-long-kafka}^]
352352

@@ -355,7 +355,7 @@ ifdef::qs[]
355355
====
356356
Congratulations! You successfully completed the {product-kafka} Getting Started quick start, and are now ready to use the service.
357357
358-
You can use either Kafkacat or the Kafka scripts to check that you can connect with your Kafka instance.
358+
You can use either Kcat or the Kafka scripts to check that you can connect with your Kafka instance.
359359
====
360360
endif::[]
361361

docs/kafka/kcat-kafka/README.adoc

Lines changed: 65 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -79,134 +79,124 @@ END GENERATED ATTRIBUTES
7979
////
8080

8181
[id="chap-using-kafkacat"]
82-
= Configuring and connecting Kafkacat with {product-long-kafka}
82+
= Configuring and connecting Kcat with {product-long-kafka}
8383
ifdef::context[:parent-context: {context}]
8484
:context: using-kafkacat
8585

8686
// Purpose statement for the assembly
8787
[role="_abstract"]
88-
As a developer of applications and services, you can use https://github.com/edenhill/kafkacat[Kafkacat^] to test and debug your Kafka instances in {product-long-kafka}.
89-
Kafkacat is a command-line utility for messaging in Apache Kafka 0.8 and later.
90-
With Kafkacat, you can produce and consume messages for your Kafka instances directly from the command line,
91-
and list topic and partition information for your Kafka instances.
88+
As a developer of applications and services, you can use https://github.com/edenhill/kcat[Kcat^] to test and debug your Kafka instances in {product-long-kafka}.
89+
Kcat is a command-line utility for messaging in Apache Kafka 0.8 and later.
90+
With Kcat, you can produce and consume messages directly from the command line. You can also list topic and partition information for your Kafka instances.
9291

9392
ifndef::community[]
94-
NOTE: Kafkacat is an open source community tool. Kafkacat is not a part of {product-kafka} and is therefore not supported by Red Hat.
93+
NOTE: Kcat is an open source community tool. Kcat is not a part of {product-kafka} and is therefore not supported by Red Hat.
9594
endif::[]
9695

97-
You can install and use Kafkacat to test and debug your Kafka instances in {product-kafka}.
98-
9996
.Prerequisites
100-
ifndef::community[]
101-
* You have a Red Hat account.
102-
endif::[]
103-
//* You have a subscription to {product-long-kafka}. For more information about signing up, see *<@SME: Where to link?>*.
10497
* You have a running Kafka instance in {product-kafka}.
10598
* https://adoptopenjdk.net/[JDK^] 11 or later is installed. (The latest LTS version of OpenJDK is recommended.)
106-
* You have installed the latest supported version of https://github.com/edenhill/kafkacat[Kafkacat^] for your operating system.
99+
* You've installed the latest supported version of https://github.com/edenhill/kcat[Kcat^] for your operating system. To verify your Kcat version, enter the following command:
107100
+
108-
.Verifying Kafkacat installation
109101
[source]
110102
----
111-
$ kafkacat -V
112-
113-
kafkacat - Apache Kafka producer and consumer tool
114-
https://github.com/edenhill/kafkacat
115-
Copyright (c) 2014-2019, Magnus Edenhill
116-
Version 1.6.0 (JSON, Avro, Transactions, librdkafka 1.6.1 builtin.features=gzip,snappy,ssl,sasl,regex,lz4,sasl_gssapi,sasl_plain,sasl_scram,plugins,zstd,sasl_oauthbearer)
103+
$ kcat -V
104+
----
105+
+
106+
You see output like the following example:
107+
+
108+
[source]
109+
----
110+
kcat - Apache Kafka producer and consumer tool
111+
https://github.com/edenhill/kcat
112+
Copyright (c) 2014-2021, Magnus Edenhill
113+
Version 1.7.0 (librdkafka 1.3.0 builtin.features=gzip,snappy,ssl,sasl,regex,lz4,sasl_gssapi,sasl_plain,sasl_scram,plugins,zstd,sasl_oauthbearer)
117114
----
118115

119116
// Condition out QS-only content so that it doesn't appear in docs.
120117
// All QS anchor IDs must be in this alternate anchor ID format `[#anchor-id]` because the ascii splitter relies on the other format `[id="anchor-id"]` to generate module files.
121118
ifdef::qs[]
122119
[#description]
123120
====
124-
Learn how to use Kafkacat to interact with a Kafka instance in {product-long-kafka}.
121+
Learn how to use Kcat to interact with a Kafka instance in {product-long-kafka}.
125122
====
126123

127124
[#introduction]
128125
====
129-
Welcome to the quick start for {product-long-kafka} with Kafkacat. In this quick start, you'll learn how to use https://github.com/edenhill/kafkacat[Kafkacat^] to produce and consume messages for your Kafka instances in {product-kafka}.
126+
Welcome to the quick start for {product-long-kafka} with Kcat. In this quick start, you'll learn how to use https://github.com/edenhill/kcat[Kcat^] to produce and consume messages for your Kafka instances in {product-kafka}.
130127
====
131128
endif::[]
132129

133130
[id="proc-configuring-kafkacat_{context}"]
134-
== Configuring Kafkacat to connect to a Kafka instance
131+
== Configuring Kcat to connect to a Kafka instance
135132

136133
[role="_abstract"]
137-
To enable Kafkacat to access a Kafka instance, configure the connection using the bootstrap server endpoint for the instance and the generated credentials for your {product-kafka} service account. For Kafkacat, you can configure connection information either by passing options to the `kafkacat` command or by using a configuration file. The example in this task sets environment variables and then passes them to the `kafkacat` command.
134+
To enable Kcat to access a Kafka instance, you must configure a connection. The configuration must include the bootstrap server endpoint for the Kafka instance and the credentials for your {product-long-kafka} service account.
138135

139-
For more information about Kafkacat configuration options, see https://github.com/edenhill/kafkacat#configuration[Configuration^] in the Kafkacat documentation.
136+
You can either pass these values to the `kcat` command or use a configuration file. In this task, you set environment variable values and then pass them to the `kcat` command.
140137

141-
NOTE: Kafkacat does not yet fully support SASL/OAUTHBEARER authentication, so connecting to a Kafka instance requires only the bootstrap server and the service account credentials for SASL/PLAIN authentication.
138+
For more information about Kcat configuration options, see https://github.com/edenhill/kcat#configuration[Configuration^] in the Kcat documentation.
142139

143-
NOTE: Kafkacat have been recently renamed to kcat. If you use latest version of kafkacat please replace all occurences referencing kafkacat binary to kcat
140+
NOTE: Kcat does not yet fully support SASL/OAUTHBEARER authentication, which requires you to specify an access token in addition to service account credentials. Therefore, you use SASL/PLAIN authentication to connect to your Kafka instance with just service account credentials.
144141

145142
.Prerequisites
146-
ifndef::qs[]
147-
* You have the bootstrap server endpoint for your Kafka instance. To relocate the server endpoint, select your Kafka instance in the {product-kafka} web console, select the options menu (three vertical dots), and click *Connection*.
148-
* You have the generated credentials for your service account. To reset the credentials, use the {service-accounts-url}[Service Accounts^] page in the *Application Services* section of the Red Hat Hybrid Cloud Console.
149-
* You've set the permissions for your service account to access the Kafka instance resources. To verify the current permissions, select your Kafka instance in the {product-kafka} web console and use the *Access* page to find your service account permission settings.
150-
endif::[]
143+
* You have the bootstrap server endpoint for your Kafka instance. To get the server endpoint, select your Kafka instance in the {product-long-kafka} web console, select the options icon (three vertical dots), and click *Connection*.
144+
* You have the generated credentials for your service account. To reset the credentials, use the {service-accounts-url}[Service Accounts^] page.
145+
* You've set permissions for your service account to access resources in the Kafka instance. To verify the current permissions, select your Kafka instance in the {product-long-kafka} web console and click the *Access* tab. To learn more about setting permissions, see {base-url}{access-mgmt-url-kafka}[Managing account access in {product-long-kafka}^].
151146

152147
.Procedure
153-
* On the command line, set the Kafka instance bootstrap server and client credentials as environment variables to be used by Kafkacat or other applications. Replace the values with your own server and credential information.
148+
* On the command line, set the Kafka instance bootstrap server and client credentials as environment variables to be used by Kcat. Replace the values with your own server and credential information.
154149
+
155-
--
156-
ifdef::qs[]
157-
The `<bootstrap_server>` is the bootstrap server endpoint for your Kafka instance. The `<client_id>` and `<client_secret>` are the generated credentials for your service account. You copied this information previously for the Kafka instance in {product-kafka} by selecting the options menu (three vertical dots) and clicking *Connection*.
158-
endif::[]
159-
160-
.Setting environment variables for server and credentials
150+
.Setting environment variables for bootstrap server and client credentials
161151
[source,subs="+quotes"]
162152
----
163153
$ export KAFKA_HOST=__<bootstrap_server>__
164154
$ export RHOAS_SERVICE_ACCOUNT_CLIENT_ID=__<client_id>__
165155
$ export RHOAS_SERVICE_ACCOUNT_CLIENT_SECRET=__<client_secret>__
166156
----
167-
--
168157

169158
[id="proc-producing-messages-kafkacat_{context}"]
170-
== Producing messages in Kafkacat
159+
== Producing messages in Kcat
171160

172161
[role="_abstract"]
173-
You can use Kafkacat to produce messages to Kafka topics in several ways, such as reading them from standard input (`stdin`) directly on the command line or from a file. This example produces messages from input on the command line. For more examples of Kafkacat producer messaging, see the https://github.com/edenhill/kafkacat#examples[Examples^] in the Kafkacat documentation.
162+
You can use Kcat to produce messages to Kafka topics in several ways, such as reading them from standard input (`stdin`) on the command line, or from a file. In this task, you produce messages from input on the command line. For more examples of Kcat producer messaging, see https://github.com/edenhill/kcat#examples[Examples^] in the Kcat documentation.
174163

175164
.Prerequisites
176-
* Kafkacat is installed.
177-
* You have a running Kafka instance in {product-kafka}.
165+
* Kcat is installed.
166+
* You have a running Kafka instance in {product-long-kafka}.
167+
* You have a topic in your Kafka instance that you can use to produce and consume messages.
178168
* You've set the Kafka bootstrap server endpoint and your service account credentials as environment variables.
179169

180170
.Procedure
181-
. On the command line, enter the following commands to start Kafkacat in _producer_ mode. This mode enables you to produce messages to your Kafka topic.
171+
. On the command line, enter the following command to start Kcat in producer mode. This mode enables you to produce messages to your Kafka topic. Replace `_<kafka-topic>_` with your own topic name.
182172
+
183173
--
184-
This example uses the SASL/PLAIN authentication mechanism with the server and credential environment variables that you set previously. This example produces messages to a topic in {product-kafka} named `my-first-kafka-topic`. Replace the topic name with the relevant topic as needed. The topic that you use in this command must already exist in {product-kafka}.
185-
186-
.Starting Kafkacat in producer mode
187-
[source]
174+
.Starting Kcat in producer mode
175+
[source,subs="+quotes"]
188176
----
189-
$ kafkacat -t my-first-kafka-topic -b "$KAFKA_HOST" \
177+
$ kcat -t _<kafka-topic>_ -b "$KAFKA_HOST" \
190178
-X security.protocol=SASL_SSL -X sasl.mechanisms=PLAIN \
191179
-X sasl.username="$RHOAS_SERVICE_ACCOUNT_CLIENT_ID" \
192180
-X sasl.password="$RHOAS_SERVICE_ACCOUNT_CLIENT_SECRET" -P
193181
----
194182

195-
NOTE: {product-kafka} also supports the SASL/OAUTHBEARER mechanism for authentication, which is the recommended authentication mechanism to use. However, Kafkacat does not yet fully support OAUTHBEARER, so this example uses SASL/PLAIN.
183+
NOTE: Kcat does not yet fully support SASL/OAUTHBEARER authentication, which requires you to specify an access token in addition to service account credentials. Therefore, you use SASL/PLAIN authentication to connect to your Kafka instance with just service account credentials.
196184

197-
NOTE: A Kafkacat producer might behave differently depending on the operating system. For example, on Mac operating systems, messages are sent by redirecting them to the Kafkacat binary in the format `echo "message" | kafkacat ...`.
185+
NOTE: A Kcat producer might behave differently based on the operating system. For example, on Mac operating systems, messages are sent by redirecting them to the Kcat binary in the format `echo "message" | kcat ...`.
198186

199187
--
200-
. With Kafkacat running in producer mode, enter messages into Kafkacat that you want to produce to the Kafka topic.
188+
. With Kcat running in producer mode, enter messages that you want to produce to the Kafka topic, as shown in the following example:
201189
+
202-
.Example messages to produce to the Kafka topic
203190
[source]
204191
----
205192
First message
206193
Second message
207194
Third message
208195
----
209-
. Keep this producer running to use later when you create a consumer.
196+
. To finish producing the messages you entered, press `CTRL+D`.
197+
. Keep the producer running so that you can use it again later, when you create a consumer.
198+
+
199+
NOTE: On Mac operating systems, pressing `CTRL+D` produces the messages you entered and then stops the producer. To use the producer again, you must restart it, as shown earlier in this task.
210200

211201
.Verification
212202
ifdef::qs[]
@@ -217,55 +207,58 @@ ifndef::qs[]
217207
endif::[]
218208

219209
[id="proc-consuming-messages-kafkacat_{context}"]
220-
== Consuming messages in Kafkacat
210+
== Consuming messages in Kcat
221211

222212
[role="_abstract"]
223-
You can use Kafkacat to consume messages from Kafka topics. This example consumes the messages that you sent previously with the producer that you created with Kafkacat.
213+
You can also use Kcat to consume messages from Kafka topics. In this task, you use Kcat to consume the messages that you previously produced to your topic.
224214

225215
.Prerequisites
226-
* Kafkacat is installed.
227-
* You have a running Kafka instance in {product-kafka}.
228-
* You've set the Kafka bootstrap server endpoint and your service account credentials as environment variables.
229-
* You used a producer to produce example messages to a topic.
216+
* Kcat is installed.
217+
* You have a running Kafka instance in {product-long-kafka}.
218+
* You used Kcat to produce example messages to a topic in your Kafka instance.
230219

231220
.Procedure
232-
. On the command line in a separate terminal from your producer, enter the following commands to start Kafkacat in _consumer_ mode. This mode enables you to consume messages from your Kafka topic.
221+
. Open a second terminal window or tab, separate from your producer.
222+
. On the command line, enter the following command to start Kcat in _consumer_ mode. This mode enables you to consume messages from your Kafka topic. Replace `_<kafka-topic>_` with the name of the topic that you previously produced messages to.
233223
+
234224
--
235-
This example uses the SASL/PLAIN authentication mechanism with the server and credential environment variables that you set previously. This example consumes and displays the messages from the `my-first-kafka-topic` example topic, and states that it reached the end of partition `0` in the topic.
236-
237-
.Starting Kafkacat in consumer mode
238-
[source]
225+
.Starting Kcat in consumer mode
226+
[source,subs="+quotes"]
239227
----
240-
$ kafkacat -t my-first-kafka-topic -b "$KAFKA_HOST" \
228+
$ kcat -t _<kafka-topic>_ -b "$KAFKA_HOST" \
241229
-X security.protocol=SASL_SSL -X sasl.mechanisms=PLAIN \
242230
-X sasl.username="$RHOAS_SERVICE_ACCOUNT_CLIENT_ID" \
243231
-X sasl.password="$RHOAS_SERVICE_ACCOUNT_CLIENT_SECRET" -C
232+
----
244233

234+
You see output that looks like the following example. The message values are the ones you previously sent using the producer.
235+
236+
[source,subs="+quotes"]
237+
----
245238
First message
246239
Second message
247240
Third message
248-
% Reached end of topic my-first-kafka-topic [0] at offset 3
241+
% Reached end of topic _<kafka-topic>_ [0] at offset 3
249242
----
250243
--
251244
. If your producer is still running in a separate terminal, continue entering messages in the producer terminal and observe the messages being consumed in the consumer terminal.
252245

253-
NOTE: You can also use the {product-long-kafka} web console to browse messages in the Kafka topic. For more information, see {base-url}{message-browsing-url-kafka}[_Browsing messages in the {product-long-kafka} web console_^].
246+
NOTE: You can also use the {product-kafka} web console to browse messages in the Kafka topic. For more information, see {base-url}{message-browsing-url-kafka}[Browsing messages in the {product-long-kafka} web console^].
254247

255248
.Verification
256249
ifdef::qs[]
257250
* Is your consumer running without any errors in the terminal?
258-
* Did the consumer display the messages from the `my-first-kafka-topic` example topic?
251+
* Did the consumer display the messages from your Kafka topic?
259252
endif::[]
260253
ifndef::qs[]
261254
. Verify that your consumer is running without any errors in the terminal.
262-
. Verify that the consumer displays the messages from the `my-first-kafka-topic` example topic.
255+
. Verify that the consumer displays the messages from your Kafka topic.
263256
endif::[]
264257

265258
ifdef::qs[]
266259
[#conclusion]
267260
====
268-
Congratulations! You successfully completed the {product-kafka} Kafkacat quick start, and are now ready to produce and consume messages in the service.
261+
Congratulations! You successfully completed the {product-kafka} Kcat quick start, and are now ready to produce and consume messages in the service.
269262
====
270263
endif::[]
271264

docs/kafka/kcat-kafka/quickstart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
description: !snippet README.adoc#description
1717
prerequisites:
1818
- A running Kafka instance (see the Getting Started quick start)
19-
- The latest supported version of Kafkacat for your operating system
19+
- The latest supported version of Kcat for your operating system
2020
- A command-line terminal application
2121
- JDK 11 or later (the latest LTS version of OpenJDK is recommended)
2222
introduction: !snippet README.adoc#introduction

docs/registry/getting-started-registry/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ NOTE: HTTP Basic authentication is also available for tools and libraries that d
249249
+
250250
You’ll use the service account information that you saved to configure your applications to connect to your {registry} instances later when you're ready.
251251
+
252-
For example, if you plan to use https://github.com/edenhill/kafkacat[Kafkacat^] to interact with your Kafka instance and deserialize Avro messages using {registry}, you'll use this information to set your {registry} URL in the client environment variables.
252+
For example, if you plan to use https://github.com/edenhill/kcat[Kcat^] to interact with your Kafka instance and deserialize Avro messages using {registry}, you'll use this information to set your {registry} URL in the client environment variables.
253253
+
254254
To review your service account information, reset your credentials, or delete the service account, use the left navigation menu to go to the *Service Accounts* page.
255255

0 commit comments

Comments
 (0)