Skip to content

Commit af509bb

Browse files
docs(nodejs-kafka): update env variables according to CLI output (#532)
1 parent 3cec3a7 commit af509bb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/kafka/nodejs-kafka/README.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ To enable your Node.js application to access a Kafka instance, you must configur
141141
* The generated credentials for your {product-kafka} service account
142142
* The Simple Authentication and Security Layer (SASL) mechanism that the client will use to authenticate with the Kafka instance
143143

144-
In this task, you'll create a new configuration file called `.env`. In this file, you'll set the required bootstrap server and client credentials as environment variables.
144+
In this task, you'll create a new configuration file called `rhoas.env`. In this file, you'll set the required bootstrap server and client credentials as environment variables.
145145

146146
.Prerequisites
147147
ifndef::qs[]
@@ -152,16 +152,16 @@ endif::[]
152152

153153
.Procedure
154154

155-
. In your IDE, create a new file. Save the file with the name `.env`, at the root level of the `reactive-example` directory for the cloned repository.
155+
. In your IDE, create a new file. Save the file with the name `rhoas.env`, at the root level of the `reactive-example` directory for the cloned repository.
156156

157-
. In the `.env` file, add the lines shown in the example. These lines set the bootstrap server and client credentials as environment variables to be used by the Node.js application.
157+
. In the `rhoas.env` file, add the lines shown in the example. These lines set the bootstrap server and client credentials as environment variables to be used by the Node.js application.
158158
+
159-
.Setting environment variables in the .env file
159+
.Setting environment variables in the rhoas.env file
160160
[source,subs="+quotes"]
161161
----
162-
KAFKA_BOOTSTRAP_SERVER=__<bootstrap_server>__
163-
KAFKA_CLIENT_ID=__<client_id>__
164-
KAFKA_CLIENT_SECRET=__<client_secret>__
162+
KAFKA_HOST=__<bootstrap_server>__
163+
RHOAS_CLIENT_ID=__<client_id>__
164+
RHOAS_CLIENT_SECRET=__<client_secret>__
165165
KAFKA_SASL_MECHANISM=plain
166166
----
167167
+
@@ -179,7 +179,7 @@ endif::[]
179179
+
180180
In this case, observe that the Node.js application uses the SASL/PLAIN authentication method (that is, the value of `KAFKA_SASL_MECHANISM` is set to `plain`). This means that the application uses only the client ID and client secret to authenticate with the Kafka instance. The application doesn't require an authentication token.
181181

182-
. Save the `.env` file.
182+
. Save the `rhoas.env` file.
183183

184184
ifdef::qs[]
185185
.Verification
@@ -334,11 +334,11 @@ NOTE: You can also use the {product-long-kafka} web console to browse messages i
334334

335335
. In your IDE, in the `producer-backend` directory of the repository that you cloned, open the `producer.js` file.
336336
+
337-
Observe that the producer component is configured to process environment variables from the `.env` file that you created. The component used the bootstrap server endpoint and client credentials stored in this file to connect to the Kafka instance.
337+
Observe that the producer component is configured to process environment variables from the `rhoas.env` file that you created. The component used the bootstrap server endpoint and client credentials stored in this file to connect to the Kafka instance.
338338

339339
. In the `consumer-backend` directory, open the `consumer.js` file.
340340
+
341-
Observe that the consumer component is also configured to process environment variables from the `.env` file that you created.
341+
Observe that the consumer component is also configured to process environment variables from the `rhoas.env` file that you created.
342342

343343
ifdef::qs[]
344344
.Verification

0 commit comments

Comments
 (0)