Show Table of Contents
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

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.