[][src]Function pulsar_sys::pulsar_reader_configuration_set_receiver_queue_size

pub unsafe extern "C" fn pulsar_reader_configuration_set_receiver_queue_size(
    configuration: *mut pulsar_reader_configuration_t,
    size: c_int
)

Sets the size of the reader receive queue.

The consumer receive queue controls how many messages can be accumulated by the Consumer before the application calls receive(). Using a higher value could potentially increase the consumer throughput at the expense of bigger memory utilization.

Setting the consumer queue size as zero decreases the throughput of the consumer, by disabling pre-fetching of messages. This approach improves the message distribution on shared subscription, by pushing messages only to the consumers that are ready to process them. Neither receive with timeout nor Partitioned Topics can be used if the consumer queue size is zero. The receive() function call should not be interrupted when the consumer queue size is zero.

Default value is 1000 messages and should be good for most use cases.

@param size the new receiver queue size value