pulsar-client-php
pulsar-client-php copied to clipboard
Regarding ConsumerOptions
According to implementation
public function setReceiveQueueSize(int $size)
{
if ($size <= 0) {
$size = 1000;
}
$this->data[ self::RECEIVE_QUEUE_SIZE ] = $size;
}
for $size == 0 actual 'RECEIVE_QUEUE_SIZE' will be 1000.
According to recommendations: "...set the consumers' receiver queue size very low (potentially even to 0 if necessary)..."
I cannot override setReceiveQueueSize, because ConsumerOptions is final.
If you agree, I will create PR with fix, something like
public function setReceiveQueueSize(int $size)
{
if ($size < 0)
{
$size = 1000;
}
$this->data[ self::RECEIVE_QUEUE_SIZE ] = $size;
}
meanwhile I will use public $data directly
I tested it and set it to 0, the consumer will not receive the message. I don't quite understand why this use case is needed, but if you need it, you can submit a PR.
Re-opened just FYI:
Looks as client side issue