class documentation

class ConsumerBatchReceivePolicy: (source)

View In Hierarchy

Batch receive policy can limit the number and bytes of messages in a single batch, and can specify a timeout for waiting for enough messages for this batch.

A batch receive action is completed as long as any one of the conditions (the batch has enough number or size of messages, or the waiting timeout is passed) are met.

Method __init__ Wrapper BatchReceivePolicy.
Method policy Returns the actual one BatchReceivePolicy.
Instance Variable _policy Undocumented
def __init__(self, max_num_message, max_num_bytes, timeout_ms): (source)

Wrapper BatchReceivePolicy.

Parameters
max_num_message:Max num message, if less than 0, it means no limit. default: -1
max_num_bytes:Max num bytes, if less than 0, it means no limit. default: 10 * 1024 * 1024
timeout_ms:If less than 0, it means no limit. default: 100
def policy(self): (source)

Returns the actual one BatchReceivePolicy.

Undocumented