File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,21 +65,21 @@ const client = new KafkaClient({
65
65
});
66
66
```
67
67
68
- ## Sending Messages
68
+ ## Publishing to a Topic
69
69
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.
71
71
72
72
``` js
73
73
client .publishToTopic (topic, message);
74
74
```
75
75
76
- ## Consuming Messages
76
+ ## Subscribing to a Topic
77
77
78
78
The package uses non-flowing consumer mode with ` enable.auto.commit ` enabled along with ` auto.offset.reset ` set to earliest.
79
79
80
80
The messages are consumed at an interval of 1 second with 10 messages consumed at each interval.
81
81
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.
83
83
84
84
``` js
85
85
client .subscribeToTopic (topic, onMessage);
You can’t perform that action at this time.
0 commit comments