Commit 81175ff
authored
feat(pubsub): allow explicit ack/nack on messages (talkiq#931)
Adds new ack() and nack() methods on SubscriberMessage which allow users
to forcibly mark a messsage as getting acked or nacked, regardless of
the success of the callback. In plain English:
When `callback` terminates, if `.ack()` has been called it acks. Else,
if `.nack()` has been called it nacks. Else, it acks if no exception was
raised and nacks otherwise.
Fixes talkiq#8371 parent 6480a1d commit 81175ff
3 files changed
Lines changed: 46 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
289 | 304 | | |
290 | 305 | | |
291 | 306 | | |
292 | 307 | | |
293 | | - | |
| 308 | + | |
294 | 309 | | |
295 | 310 | | |
296 | 311 | | |
| |||
300 | 315 | | |
301 | 316 | | |
302 | 317 | | |
303 | | - | |
| 318 | + | |
304 | 319 | | |
305 | | - | |
306 | 320 | | |
307 | | - | |
308 | | - | |
| 321 | + | |
309 | 322 | | |
310 | 323 | | |
311 | 324 | | |
312 | 325 | | |
313 | | - | |
314 | | - | |
| 326 | + | |
315 | 327 | | |
316 | 328 | | |
317 | 329 | | |
| |||
326 | 338 | | |
327 | 339 | | |
328 | 340 | | |
329 | | - | |
| 341 | + | |
330 | 342 | | |
331 | 343 | | |
332 | 344 | | |
| |||
450 | 462 | | |
451 | 463 | | |
452 | 464 | | |
453 | | - | |
| 465 | + | |
454 | 466 | | |
455 | 467 | | |
456 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments