From commits-return-22679-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Wed Feb 20 11:38:52 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id AB6AE18077A for ; Wed, 20 Feb 2019 12:38:51 +0100 (CET) Received: (qmail 49443 invoked by uid 500); 20 Feb 2019 11:38:50 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 49428 invoked by uid 99); 20 Feb 2019 11:38:50 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2019 11:38:50 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] sijie commented on issue #3625: [Issue #3436][pulsar-broker] Creating REST Endpoint for non-partitioned topic creation Message-ID: <155066273023.20937.12482947022751472282.gitbox@gitbox.apache.org> Date: Wed, 20 Feb 2019 11:38:50 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sijie commented on issue #3625: [Issue #3436][pulsar-broker] Creating REST Endpoint for non-partitioned topic creation URL: https://github.com/apache/pulsar/pull/3625#issuecomment-465539620 > A non-partitioned topic is created in `internalCreateSubscription`, but functions as a temporary topic from which a subscription could be created. So if we created a non-partitioned PersistentTopic outside of this method, what would we do with it? Currently the default behavior is a non-partitioned topic automatically created when a consumer subscribe or a publisher publishes a message. With you previous change, we disable this auto-creation. so the endpoint is the only way to create the non-partitioned topic. If a topic is created by the rest endpoint, when consumer/publisher connect, they will be realizing that the topic has been created. they will continue consuming or publishing messages. > I remember that `createPartitionedTopic` needed to be improved. I noticed that there is a precondition which prevents the number of partitions from being created to be less than two. So my understanding here is that we should remove this condition (i.e. allow the creation of a topic with no partitions) ? I think that should be a different pull request and a separated discussion. Changing the behavior of creating partitioned topic (e.g. allow creating a partitioned topic with only 1 partition) should be discussed at dev@ mailing list. It should be done via a PIP, since it is a user facing behavior change though. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services