e-marchand-exensa commented on issue #8679:
URL: https://github.com/apache/pulsar/issues/8679#issuecomment-839839379
Here is an extract of the `consumer` creation
```
final var builder = pulsarClient.newConsumer()
.consumerName( consumerName )
.topic( topic )
.subscriptionName( subscription )
.subscriptionType( SubscriptionType.Exclusive )
.subscriptionInitialPosition( SubscriptionInitialPosition.Latest )
.batchReceivePolicy( batchPolicy )
.receiverQueueSize( batchPolicy.getMaxNumMessages() > 0 ?
2*batchPolicy.getMaxNumMessages() : 1024 )
.maxTotalReceiverQueueSizeAcrossPartitions( 32 * 1024 )
.acknowledgmentGroupTime( 250, TimeUnit.MILLISECONDS );
```
with the following `batchPolicy`
```
BatchReceivePolicy.builder()
.maxNumMessages( 42 )
.maxNumBytes( -1 ) // FIXME: because of issue #7696 in Pulsar v2.5.2
.timeout( 1, TimeUnit.SECONDS );
```
`maxNumMessages` depends on the topic (in [128..4096]).
`timeout` depends on the topic (in [250ms..1000ms]).
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]