Commit e94436c
authored
fix(pubsub/v2): return AckWithResult after NackImmediately shutdown mode (#13458)
This matches the [Java client
behavior](https://github.com/michaelpri10/java-pubsub/blob/cac469e6aa7135e7b5806401eb141082822d205f/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java#L176)
of returning AckWithResult and NackWithResult faster after the library
nacks messages at shutdown (if exactly once delivery is enabled).
The shared `sendAckWithFunc`, used by both `sendAck` and `sendModack`
functions, handles both cases and thus only needs to be added in one
place. However, at the time of writing, the function logic and length is
getting rather unwieldy and hard to parse, so I plan on separating out
these logics in the future for clarity.1 parent a413732 commit e94436c
1 file changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
| 123 | + | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| |||
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | | - | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
| |||
572 | 575 | | |
573 | 576 | | |
574 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
575 | 585 | | |
576 | 586 | | |
577 | 587 | | |
| |||
658 | 668 | | |
659 | 669 | | |
660 | 670 | | |
661 | | - | |
662 | 671 | | |
663 | 672 | | |
664 | 673 | | |
| |||
1028 | 1037 | | |
1029 | 1038 | | |
1030 | 1039 | | |
1031 | | - | |
| 1040 | + | |
1032 | 1041 | | |
1033 | 1042 | | |
1034 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1035 | 1048 | | |
0 commit comments