Prefetch: Enabled Versus Disabled

As covered earlier, a standard durable represents the interest of one subscriber object and forwards messages to the subscriber on request. The type of persistence for a standard durable depends on whether prefetch is enabled or disabled.

The following diagram illustrates two networks, Network A and Network B. In both networks, each publisher represents potentially many program processes, all of which publish on the same endpoint. Each subscriber represents potentially many program processes. There is one durable per subscriber. The store maintains interest in the message stream even when subscriber is absent.

In Network A, prefetch is enabled and the persistence store functions as a message broker, with no messages traveling from the publisher endpoint to the subscriber endpoint.

In Network B, prefetch is disabled and messages typically flow via a direct path transport from the publisher endpoint to the subscriber endpoint. The direct path transport is backed by the store that receives the message stream from the publisher endpoint and retains each message until the subscriber acknowledges (replies to) the message. The store retains unacknowledged messages if the subscriber is absent or the direct path fails and then retransmits the messages to the subscriber, as needed.

Figure 22: Prefetch Enabled and Prefetch Disabled