ciaocloud commented on a change in pull request #13195: URL: https://github.com/apache/pulsar/pull/13195#discussion_r765487797
########## File path: pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/TopicLifecyclePolicies.java ########## @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pulsar.common.policies.data; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Topic life-cycle policies. + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class TopicLifecyclePolicies { + + /** + * Whether topics should be automatically created when producers/consumers connect, or rather explicitly created + * through admin API. + */ + private boolean autoCreateTopics; + + /** + * Whether topics should be automatically deleted when inactive, or rather or rather explicitly deleted through Review comment: > I am confused about the relation between `InactiveTopicPolicies` and `TopicLifecycle`. Can you bring more details? Both `InactiveTopicPolicies` and `TopicLifecycle` are fields declared in `Policies`. The `InactiveTopicPolicies` has a boolean value `deleteWhileInactive` which determines whether topics should be automatically deleted when inactive. We ask it to be same as that defined in `TopicLifecycle`, while `TopicLifecycle` also defines whether topics should be automatically created. This endpoint is used during tenant creation time. (Also would update the above in the PR description) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
