You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/22 08:51:30 UTC

[GitHub] [pulsar] liangjiangliang commented on issue #12125: Repeated consumption

liangjiangliang commented on issue #12125:
URL: https://github.com/apache/pulsar/issues/12125#issuecomment-924720552


   we use the consumer of Java pulsarClient :
   `Messages<String> msgs=someTopicsConsumer.batchReceive();` 
   `SubscriptionType subscriptionType = SubscriptionType.Shared;
               someTopicsConsumer = client.newConsumer(Schema.STRING)
                      .topic(topic)
                      .subscriptionType(subscriptionType)
                      .subscriptionName("sink_"+SinkConstants.getINSTNAME())
                      .batchReceivePolicy(BatchReceivePolicy.builder()
                               .maxNumMessages(0)
                               .maxNumBytes(1024*1024*1700)
                               .timeout(600, TimeUnit.MILLISECONDS)
                               .build())
                       .receiverQueueSize(28000)
                       .subscribe();`


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org