sijie commented on a change in pull request #1269: Issue #1237: support builder 
for topicsConsumer
URL: https://github.com/apache/incubator-pulsar/pull/1269#discussion_r169898053
 
 

 ##########
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TopicsConsumerImplTest.java
 ##########
 @@ -82,12 +79,13 @@ public void testDifferentTopicsNameSubscribe() throws 
Exception {
         admin.persistentTopics().createPartitionedTopic(topicName3, 3);
 
         // 2. Create consumer
-        ConsumerConfiguration conf = new ConsumerConfiguration();
-        conf.setReceiverQueueSize(4);
-        conf.setAckTimeout(ackTimeOutMillis, TimeUnit.MILLISECONDS);
-        conf.setSubscriptionType(SubscriptionType.Shared);
         try {
-            Consumer consumer = pulsarClient.subscribeAsync(topicNames, 
subscriptionName, conf).get();
+            Consumer consumer = pulsarClient.newConsumer()
+                .topics(topicNames)
+                .subscriptionName(subscriptionName)
+                .subscriptionType(SubscriptionType.Shared)
+                .ackTimeout(ackTimeOutMillis, TimeUnit.MILLISECONDS)
 
 Review comment:
   you need configure `receiverQueueSize(4)` no? there was 
`setReceiverQueueSize(4)` at ConsumerConfiguration?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to