>> I know the message belongs to one topic will be sent to the corresponding topic, Now I wonder to know how Pulsar create a topic and its namespace before that.
Namespace: You can create multiple namespaces under a property using Admin-API/CLI-tool <https://pulsar.incubator.apache.org/docs/latest/admin-api/namespaces/#create> . eg: Following cli-command creates a namespace "namespace-1" under property "test-property". $ *pulsar-admin* namespaces create test-property/test-cluster/namespace-1 Once you have namespace, you can create any number of topics under that namespace. *You don't have to explicitly create the topic under the namespace but attempting to write or receive message on a topic that does not yet exist, Pulsar will automatically create that topic under the namespace.* So, as soon as you try to create producer/consumer on the topic for very first time, broker creates a persistent-topic dynamically if it's not created yet. >>> Pulsar namespace and is there some specific design document? If I send message to a new topic, how Pulsar create namespace and topic? Yes, we have documented it partially at Getting-started <https://pulsar.incubator.apache.org/docs/latest/getting-started/ConceptsAndArchitecture/#topics> and cluster-setup <https://pulsar.incubator.apache.org/docs/latest/getting-started/LocalCluster/#Testingyourclustersetup-9m81k> but, we will add more description on it by next release <https://github.com/apache/incubator-pulsar/pull/719/files>. Thanks, Rajan On Mon, Aug 28, 2017 at 6:57 AM, Arvin Yao <[email protected]> wrote: > Hello, > I’m new to Pulsar and try to understand its running principle. I > think I’m familiar the basic concept in Pulsar but confused with the whole > running process. I know the message belongs to one topic will be sent to > the corresponding topic, Now I wonder to know how Pulsar create a topic > and its namespace before that. I search the Pulsar code, and found > NamespaceService and found it’s responsible for namespace manage and found > PersistentTopic which is responsible for topic manage. I found Namespace > has registerBootstrapNamespaces method to register bootstrap namespaces, is > the heartbeat and other information implemented using Pulsar namespace and > is there some specific design document? If I send message to a new topic, > how Pulsar create namespace and topic? Now I’m lost in finding connections > with different class to understand the process, how can I accelerate this > work? by step into the call stack when broker run or other?
