7.3.2. Enable Receiver Prefetch
To enable a receiver to prefetch messages, set its capacity to a value greater than 0.
For example, the following code creates a receiver and enables prefetching of up to 100 messages:
- Python
import sys from qpid.messaging import * connection = Connection("localhost:5672") connection.open() ssn = connection.session() prefetchingReceiver = ssn.receiver("testqueue; {create:always}"); prefetchingReceiver.capacity = 100