Automatic Fetch Disabled

To disable automatic fetch, set prefetch=none.

Even when prefetch=none, a queue consumer can still hold a message. For example, a receive call initiates fetch, but its timeout elapses before the server finishes transferring the message. This situation leaves a fetched message waiting in the message consumer. A second receive call does not fetch another message; instead, it accepts the message that is already waiting. A third receive call initiates another fetch.

Notice that a waiting message still belongs to the queue consumer, and the server does not deliver it to another queue consumer (unless the first queue consumer’s connection to the server is broken). To prevent messages from waiting in this state for long periods of time, code programs either to call receive with no timeout, or to call it (with timeout) repeatedly and shorten the interval between calls.

Note: Automatic fetch cannot be disabled for global queues or for topics.