Commit 1a6877a
committed
consumer: fix consumeNum to respect the consume timeout
Steps to reproduce:
* configure consumer with setDefaultConsumeTimeout(1000)
* produce 1 message every 500ms
* call consumer.consume(128, cb)
Actual outcome:
* consume returns 128 messages after 64 seconds
Expected outcome:
* consumer returns ~2 messages after 1 second
KafkaConsumerConsumeNum call underlaying c++ m_consumer->Consume
in cycle until
* either the accumulated batch is full
* or the call to c++ m_consumer->Consume times out on the total timeout
KafkaConsumerConsumeNum must enforce its timeout
over all m_consumer->Consume invocations altogether.1 parent 095352a commit 1a6877a
2 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
275 | 318 | | |
276 | 319 | | |
277 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
| 815 | + | |
813 | 816 | | |
814 | 817 | | |
815 | 818 | | |
| |||
838 | 841 | | |
839 | 842 | | |
840 | 843 | | |
| 844 | + | |
| 845 | + | |
841 | 846 | | |
842 | 847 | | |
843 | 848 | | |
| |||
0 commit comments