lordcheng10 commented on a change in pull request #14515:
URL: https://github.com/apache/pulsar/pull/14515#discussion_r816814691



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java
##########
@@ -161,8 +161,17 @@ default boolean isChunked() {
      * @param option
      * @return
      */
+    @Deprecated
     CompletableFuture<Consumer> subscribe(SubscriptionOption option);
 
+    /**
+     * Subscribe a topic.
+     *
+     * @param autoShrink whether ConcurrentLongLongPairHashMap supports 
automatic shrinking.
+     * @return
+     */
+    CompletableFuture<Consumer> subscribe(SubscriptionOption option, boolean 
autoShrink);

Review comment:
       > I believe that overall we don't need a configuration flag at all.
   
   Do you think the autoShrink configuration item should not be added? When 
defining pendingAcks, set it directly to true? For example:
                this.pendingAcks = ConcurrentLongLongPairHashMap.newBuilder()
                        .autoShrink(true)
                        .expectedItems(256)
                        .concurrencyLevel(1)
                        .build();




-- 
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]


Reply via email to