Durable Prefetch Count

The prefetch count parameter of a durable limits the number of messages per batch that the durable can deliver to a subscriber. This value affects delivery performance.

Positive integer values enable prefetch, and determine the maximum batch size. Zero disables prefetch, however, zero is a legal value only for standard durables.

Appropriate values for prefetch count depend on the use case.

For standard durables that will back a direct path, set this parameter to zero for best performance. (Standard durables are already optimized for direct path delivery without prefetch.)

For standard durables that will deliver messages in the absence of a direct path, set this parameter to a non-zero starting value of 1024. You can tune this parameter to optimize delivery speed. If the durable's message backlog grows, try increasing this value. If the subscriber is overloaded and discards messages, try decreasing this value.

For shared durables, you can tune this parameter empirically to improve message throughput:
  • If some subscribers are idle while others are overloaded, try decreasing this value.
  • If the durable has a large message backlog, yet subscribers could process more messages, try increasing this value.

For last-value durables, you can tune this parameter to control the flow of messages from a fast publisher.

With wide-area stores, the best practice is non-zero prefetch with either shared durables or standard durables.

Note: It is illegal to enable or disable prefetch after a durable configuration has been deployed to the FTL server. (Nonetheless, you may still change the prefetch value from one positive integer to another positive integer.)