Commit 2bb22ae
authored
fix(pubsub): set default stream ACK deadline to subscriptions' (googleapis#9268)
* feat(pubsub): set default stream ACK deadline to subscriptions'
When subscribing, it makes sense to use the configured subscription's
maximum ACK deadline for the streaming pull, instead of an optimistic
minimum of 10 seconds.
Using an optimistic deadline affects messages that are put on hold and
are not lease managed, because by the time the client dispatches them
to the user's callback, the optimistic ACK deadline could have already
been missed, resulting in the backend unnecessary re-sending those
messages, even if the subscription's ACK deadline has not been hit yet.
* Rename sub_future to subscription_future1 parent 21cf56e commit 2bb22ae
File tree
3 files changed
+95
-22
lines changed- pubsub
- google/cloud/pubsub_v1/subscriber/_protocol
- tests
- unit/pubsub_v1/subscriber
3 files changed
+95
-22
lines changedLines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
387 | 393 | | |
388 | 394 | | |
389 | | - | |
| 395 | + | |
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
394 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
395 | 407 | | |
396 | 408 | | |
397 | 409 | | |
| |||
462 | 474 | | |
463 | 475 | | |
464 | 476 | | |
465 | | - | |
| 477 | + | |
466 | 478 | | |
467 | 479 | | |
468 | 480 | | |
469 | 481 | | |
470 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
471 | 487 | | |
472 | 488 | | |
473 | 489 | | |
| |||
486 | 502 | | |
487 | 503 | | |
488 | 504 | | |
489 | | - | |
| 505 | + | |
490 | 506 | | |
491 | 507 | | |
492 | 508 | | |
| |||
511 | 527 | | |
512 | 528 | | |
513 | 529 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | 530 | | |
523 | 531 | | |
524 | 532 | | |
| |||
535 | 543 | | |
536 | 544 | | |
537 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
538 | 555 | | |
539 | 556 | | |
540 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
384 | 433 | | |
385 | 434 | | |
386 | 435 | | |
| |||
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
408 | 413 | | |
409 | 414 | | |
410 | 415 | | |
| |||
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
429 | | - | |
| 434 | + | |
430 | 435 | | |
431 | 436 | | |
432 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
433 | 442 | | |
434 | 443 | | |
435 | 444 | | |
| |||
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
577 | | - | |
| 586 | + | |
578 | 587 | | |
579 | 588 | | |
580 | 589 | | |
581 | | - | |
| 590 | + | |
582 | 591 | | |
583 | 592 | | |
584 | 593 | | |
| |||
587 | 596 | | |
588 | 597 | | |
589 | 598 | | |
590 | | - | |
| 599 | + | |
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
594 | | - | |
| 603 | + | |
595 | 604 | | |
596 | 605 | | |
597 | 606 | | |
| |||
660 | 669 | | |
661 | 670 | | |
662 | 671 | | |
| 672 | + | |
| 673 | + | |
663 | 674 | | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 675 | + | |
669 | 676 | | |
670 | 677 | | |
671 | 678 | | |
| |||
0 commit comments