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_r169898223
 
 

 ##########
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TopicsConsumerImplTest.java
 ##########
 @@ -103,18 +101,20 @@ public void testGetConsumersAndGetTopics() throws 
Exception {
         final String topicName1 = "persistent://prop/use/ns-abc/topic-1-" + 
key;
         final String topicName2 = "persistent://prop/use/ns-abc/topic-2-" + 
key;
         final String topicName3 = "persistent://prop/use/ns-abc/topic-3-" + 
key;
-        List<String> topicNames = Lists.newArrayList(topicName1, topicName2, 
topicName3);
+        List<String> topicNames = Lists.newArrayList(topicName1, topicName2);
 
         admin.properties().createProperty("prop", new PropertyAdmin());
         admin.persistentTopics().createPartitionedTopic(topicName2, 2);
         admin.persistentTopics().createPartitionedTopic(topicName3, 3);
 
         // 2. Create consumer
-        ConsumerConfiguration conf = new ConsumerConfiguration();
-        conf.setReceiverQueueSize(4);
-        conf.setAckTimeout(ackTimeOutMillis, TimeUnit.MILLISECONDS);
-        conf.setSubscriptionType(SubscriptionType.Shared);
-        Consumer consumer = pulsarClient.subscribeAsync(topicNames, 
subscriptionName, conf).get();
+        Consumer consumer = pulsarClient.newConsumer()
+            .topics(topicNames)
+            .topic(topicName3)
+            .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