Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][broker] Add an option to return 0 when querying partitions of a nonexistent topic #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 24, 2022

  1. [improve][broker] Add an option to return 0 when querying partitions …

    …of a nonexistent topic
    
    ### Motivation
    
    apache#10601 (comment)
    
    apache#10601 changes the behavior when querying partitions of a topic that is
    not created. Before apache#10601, 0 is returned. After apache#10601, an exception
    will be thrown to indicate the topic does not exist. It leads to the
    incompatibility with some old Pulsar clients that do not add the
    "checkAllowAutoCreation=true" query param. If they use HTTP service URL
    like "http://localhost:8080", when accessing a topic that does not
    exist, the client will fail.
    
    The affected Pulsar clients include Java client <= 2.4.2 and C++/Python
    client <= 2.8.0.
    
    ### Modifications
    
    Add an option `checkTopicExistsWhenQueryPartitions` (default: true) to
    determine the behavior. Disable this option to keep the original
    behavior that 0 will be returned when querying partitions of a
    nonexistent topic.
    BewareMyPower committed Nov 24, 2022
    Configuration menu
    Copy the full SHA
    90258b6 View commit details
    Browse the repository at this point in the history