Example: Wide-Area Behavior
For example, in the diagram, StoreS is designated as a wide-area store, and assigned for forwarding in Zone Z. All the clusters in Zone Z implement projections of StoreS (orange dashed lines). The zone type of Z is a Peer to Peer (Full Mesh).
Application programs in Rio, London, and Tokyo can publish and subscribe to the durables of StoreS, and the clusters automatically ensure that durable subscriptions and messages are available as needed in all the projections.
In this example, when a publisher in London publishes a message, the message is potentially available to all matching durables and their subscribers throughout Zone Z (red arrows).
If the Rio cluster did not have any subscribers, then the London cluster would not forward it to Rio. This behavior conserves WAN bandwidth and persistence service memory.
Figure 66: Forwarding the Messages of Wide-Area Stores
Notice that two conditions are necessary to enable wide-area forwarding - a forwarding zone and a wide-area store assigned to it. Consider the backward-compatible results when either condition is false.
- The Delft cluster is outside of forwarding Zone Z. Even though the Delft cluster implements StoreS, which is designated as a wide-area store of Zone Z, the cluster does not forward StoreS, neither out from nor in to the Delft cluster.
- StoreT is not a wide-area store, so it remains functionally outside Zone Z. Instead it is local to the Tokyo cluster. Subscriptions to durables of StoreT do not cause messages to flow in from other clusters. Publishers to StoreT do not cause messages to flow out to other clusters.
A durable subscription is required to forward messages into a cluster, but is not required to forward messages out of a cluster. For example, even if durable B were not present in London, messages from London publishers on StoreS would still be available to durable subscribers in Rio and Tokyo.