RobertIndie commented on issue #15701:
URL: https://github.com/apache/pulsar/issues/15701#issuecomment-1871842912
> @codelipenghui no, see example code:
>
> > `consumer_name=f'testconsumer-{os.getpid()}'`
This is for the consumer name. Not the subscription name.
`max_total_receiver_queue_size_across_partitions` only works for the
partitioned topic. The root cause is that the
`max_total_receiver_queue_size_across_partitions` only controls the receiver
queue size of the sub consumers instead of the parent
consumer(MultiTopicConsumer). The default receiver queue size of the parent
consumer is still 1000.
As a workaround, you can adjust the `receiver_queue_size` for the consumer
to match the `max_total_receiver_queue_size_across_partitions`.
Here is an example for your case:
```python
sub = client.subscribe(
topic=TOPIC,
subscription_name=SUBSCRIPTION,
consumer_type=ConsumerType.Shared,
max_total_receiver_queue_size_across_partitions=1,
consumer_name=f'testconsumer-{os.getpid()}',
receiver_queue_size=1
)
```
--
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]