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 — What should Subscription.topic return when the topic is deleted · Issue #991 · googleapis/google-cloud-java

What should Subscription.topic return when the topic is deleted #991

New issue
Copy link
New issue
Copy link
Closed
Closed
What should Subscription.topic return when the topic is deleted#991
Copy link
Assignees
mziccard
Labels
api: pubsubIssues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.

Description

@mziccard
mziccard
opened on May 6, 2016
Issue body actions

When a topic is deleted its subscriptions are not. For such subscriptions the topic field assumes the special value "_deleted-topic_:. What should Subscription.topic() getter return in this case? I see two main options (there surely are more).

  • Subscription.topic() returns null
  • Subscription.topic() returns TopicId.of("_deleted-topic_")

Regardless, this should be properly documented.
/cc @aozarov @eschapira to hear your thoughts

Activity

  1. mziccard
    added
    type: questionRequest for information or clarification. Not an issue.
    api: pubsubIssues related to the Pub/Sub API.
    on May 6, 2016
  2. eschapira commented on May 6, 2016

    @eschapira
    eschapira
    on May 6, 2016
    More actions

    I suggest to have a singleton and add the method isDeleted to topic.
    Returning null is semantically correct, but nulls are problematic and can
    crash the app inadvertently.

    The next question is what to do when any method is called on the deleted
    topic. You can throw NotFound on the singleton, or just call the server,
    but the error will be less intuitive.
    On May 6, 2016 5:29 PM, "Marco Ziccardi" [email protected] wrote:

    When a topic is deleted its subscriptions are not. For such subscriptions
    the topic field assumes the special value "deleted-topic:. What should
    Subscription.topic() getter return in this case? I see two main options
    (there surely are more).

    • Subscription.topic() returns null
    • Subscription.topic() returns TopicId.of("deleted-topic")

    Regardless, this should be properly documented.
    /cc @aozarov https://github.com/aozarov @eschapira
    https://github.com/eschapira to hear your thoughts

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #991

  3. mziccard commented on May 10, 2016

    @mziccard
    mziccard
    on May 10, 2016
    ContributorAuthor
    More actions

    Closed with #984

  4. mziccard
    closed this as completedon May 10, 2016
  5. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  6. github-actions
    added 2 commits that reference this issue on Jul 14, 2022

    fix: enable longpaths support for windows test (#1485) (#991)

    c41d394

    chore(main): release 3.1.0 (#988)

    805379a
  7. github-actions
    added a commit that references this issue on Sep 15, 2022

    chore(main): release 4.8.1 (#991)

    6914995
  8. github-actions
    added 2 commits that reference this issue on Oct 4, 2022

    chore(bazel): update protobuf to v3.21.7 (#991)

    8c20bdc

    chore(main): release 3.1.2 (#991)

    94431f9
  9. suztomo
    added a commit that references this issue on Feb 1, 2023

    chore: [java] remove flatten plugin dependency check (#1663) (#991)

    223b9ee
  10. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore(main): release 3.10.1 (#991)

    afb5304
  11. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(main): release 0.129.2-SNAPSHOT (#991)

    82eb278
  12. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(main): release 2.13.5 (#991)

    619ef74
  13. chingor13
    added a commit that references this issue on Feb 24, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    f403650
  14. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore(main): release 3.10.1 (googleapis#991)

    8a54c91
  15. chingor13
    added a commit that references this issue on Mar 12, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    b55ce93
  16. suztomo
    added a commit that references this issue on Mar 30, 2026

    deps: update dependency com.google.cloud:google-cloud-storage to v2.1…

    37a5ea8
  17. lqiu96
    added a commit that references this issue on Apr 1, 2026

    deps: update dependency com.google.cloud:google-cloud-storage to v2.1…

    5858637
  18. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore(main): release 1.115.3-SNAPSHOT (#991)

    c32699d

    chore(main): release 1.115.3-SNAPSHOT (#991)

    21a2104
  19. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore: release 2.1.2 (googleapis#991)

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

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

api: pubsubIssues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    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.