Skip to content

Commit 44a6e28

Browse files
committed
docs: update docs after refactor
Signed-off-by: Mirza Brunjadze <[email protected]>
1 parent 44442d0 commit 44a6e28

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

docs/consumer.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,41 +183,37 @@ If `force` is not `true`, then the method will throw an error if any `MessagesSt
183183

184184
The return value is `void`.
185185

186-
### `pause(partitions)`
186+
### `pause(topicPartitions)`
187187

188-
Pauses message consumption for specific topic-partitions.
188+
Pauses message consumption for specific topic-partitions. Pausing only prevents new fetch requests for the specified partitions. Messages that are already buffered in the stream's internal buffer may still be emitted after calling `pause()`. This method will throw an error if called before joining a consumer group or if the specified topic is not assigned to this consumer.
189189

190-
The parameter is an array of `TopicPartition` objects, where each object has:
190+
The parameter is an array of `TopicPartitions` objects, where each object has:
191191

192-
| Property | Type | Description |
193-
| --------- | -------- | ----------------------------- |
194-
| topic | `string` | The topic name. |
195-
| partition | `number` | The partition number to pause |
196-
197-
**Important:** Pausing only prevents new fetch requests for the specified partitions. Messages that are already buffered in the stream's internal buffer may still be emitted after calling `pause()`.
192+
| Property | Type | Description |
193+
| ---------- | ---------- | ------------------- |
194+
| topic | `string` | The topic name. |
195+
| partitions | `number[]` | Array of partitions |
198196

199197
The return value is `void`.
200198

201-
### `resume(partitions)`
199+
### `resume(topicPartitions)`
202200

203-
Resumes message consumption for specific topic-partitions that were previously paused.
201+
Resumes message consumption for specific topic-partitions that were previously paused. This method will throw an error if called before joining a consumer group or if the specified topic is not assigned to this consumer.
204202

205-
The parameter is an array of `TopicPartition` objects with the same structure as `pause()`.
203+
The parameter is an array of `TopicPartitions` objects (same structure as `pause()`).
206204

207205
The return value is `void`.
208206

209207
### `paused()`
210208

211209
Returns an array of all currently paused topic-partitions.
212210

213-
The return value is an array of `TopicPartition` objects.
211+
The return value is an array of `TopicPartitions` objects (same structure as `pause()`).
214212

215-
### `isPaused(partition)`
213+
### `isPaused(topic, partition)`
216214

217215
Checks if a specific topic-partition is currently paused.
218216

219-
The parameter is a `TopicPartition` object.
220-
221217
The return value is `boolean`.
222218

223219
## FAQs

0 commit comments

Comments
 (0)