Skip to content

Commit fb6a533

Browse files
update README.md
1 parent 40eecf5 commit fb6a533

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ const client = new KafkaClient({
6565
});
6666
```
6767

68-
## Sending Messages
68+
## Publishing to a Topic
6969

70-
To send a message a topic, provide the topic name and the message.
70+
To publish a message to a topic, provide the topic name and the message.
7171

7272
```js
7373
client.publishToTopic(topic, message);
7474
```
7575

76-
## Consuming Messages
76+
## Subscribing to a Topic
7777

7878
The package uses non-flowing consumer mode with `enable.auto.commit` enabled along with `auto.offset.reset` set to earliest.
7979

8080
The messages are consumed at an interval of 1 second with 10 messages consumed at each interval.
8181

82-
To consume a message from a topic, provide the topic name and a callback function that would return the message.
82+
To subscribe to a topic for consuming messages, provide the topic name and a callback function that would return the message.
8383

8484
```js
8585
client.subscribeToTopic(topic, onMessage);

0 commit comments

Comments
 (0)