GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Subscription dies when out of messages. · Issue #461 · googleapis/google-cloud-node

Subscription dies when out of messages. #461

New issue
Copy link
New issue
Copy link
Closed
Closed
Subscription dies when out of messages.#461
Copy link
Assignees
theacodes
Labels
🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Pub/Sub Beta

Description

@theacodes
theacodes
opened on Mar 23, 2015
Issue body actions

When using topic.subscription to listen to messages via pull, the subscription will (eventually) trigger an error when there are no messages. However, the desired behavior seems to be to just keep trying until messages come in. It appears it's sufficient to just ignore the error for this to continue to work as expected. See example:

  var subscription = topic.subscription(subscriptionName);
  subscription.on('error', function(err) {
    /* This error occurs when there's no new messages.
    Since we want to listen forever, this is a non-error. */
    if (err.code == 400 && err.errors[0].reason == 'failedPrecondition') return;

    /* 404 means that the subscription hasn't been created. */
    if (err.code == 404) logging.error("Pub/sub subscription does not exist.");

    throw err;
  });

Activity

Next
  1. jaredrhine commented on Mar 23, 2015

    @jaredrhine
    jaredrhine
    on Mar 23, 2015
    More actions

    Hi, @jonparrott . Are you using auto-ack? If so, a fix is available in #455.

  2. theacodes commented on Mar 24, 2015

    @theacodes
    theacodes
    on Mar 24, 2015
    Author
    More actions

    Not using autoAck.

  3. tmatsuo commented on Mar 25, 2015

    @tmatsuo
    tmatsuo
    on Mar 25, 2015
    Contributor
    More actions

    This behavior should have been changed with the Cloud Pub/Sub API v1beta2. @jonparrott do you know which API version you're using?

  4. theacodes commented on Mar 25, 2015

    @theacodes
    theacodes
    on Mar 25, 2015
    Author
    More actions

    I was using the version in npm, I tried this out with the master branch here and it doesn't seem to still be an issue. Closing.

  5. theacodes
    closed this as completedon Mar 25, 2015
  6. jgeewax
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: pubsubIssues related to the Pub/Sub API.
    on May 14, 2015
  7. jgeewax
    added this to the Pub/Sub Beta milestone on May 14, 2015
  8. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 6, 2020
  9. JustinBeckwith
    assigned
    theacodes
    on Feb 1, 2021
  10. sofisl
    added a commit that references this issue on Sep 15, 2022

    build: update gapic-generator-typescript to v1.2.10. (#461)

    5072251
  11. sofisl
    added a commit that references this issue on Sep 27, 2022

    chore: add dev dependencies for cloud-rad ref docs (#461)

    8df574c
  12. sofisl
    added 2 commits that reference this issue on Oct 11, 2022

    fix: regenerate unit tests (#461)

    58d5758

    fix: regenerate unit tests (#461)

    04b1835
  13. 21 remaining items

  14. sofisl
    added 3 commits that reference this issue on Feb 3, 2026

    build: ignore proto files in test coverage (#461)

    3ef4e27

    chore: delete Node 8 presubmit tests (#461)

    ee3a7af

    fix(deps): update dependency @grpc/grpc-js to ^0.5.0 (#461)

    b87eec5
  15. GautamSharda
    added a commit that references this issue on Feb 5, 2026

    build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#…

    a9bd38f
  16. sofisl
    added a commit that references this issue on Feb 17, 2026

    fix(deps): update dependency @grpc/grpc-js to ^0.5.0 (#461)

    1b6863b
  17. GautamSharda
    added a commit that references this issue on Feb 23, 2026

    build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#…

    32224b0
  18. sofisl
    added a commit that references this issue on Feb 25, 2026

    fix: Annotate Iam types (#461)

    380bd7e
  19. GautamSharda
    added 2 commits that reference this issue on Feb 25, 2026

    chore(main): release 4.9.0 (#461)

    4a90072

    build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#…

    6c0ec51
  20. GautamSharda
    added a commit that references this issue on Mar 5, 2026

    build!: upgrade engines field to >=8.10.0 (#461)

    bf8ed43
  21. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    fix: Annotate Iam types (googleapis#461)

    dd73621
  22. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    fix(deps): update dependency google-gax to ^0.26.0 (#461)

    a82cc23

    fix(deps): update dependency google-gax to ^0.26.0 (#461)

    a9d4a9e
  23. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    fix(deps): update dependency google-gax to ^0.26.0 (#461)

    823bff9
  24. thiyaguk09
    added a commit that references this issue on May 5, 2026

    fix(deps): update dependency google-gax to ^0.26.0 (googleapis#461)

    9bfced6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @theacodes
    theacodes

Labels

🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    • Pub/Sub Beta

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.