Wide-Area Forwarding
Client applications can publish and subscribe across network boundaries. To enable this behavior, administrators define forwarding zones and wide-area stores.
Background
Ordinarily, a network limits the geographic scope of persistence. That is, a persistence cluster implements a store, and the durables of the store are accessible only to publishers and subscribers running within the network that connects the persistence services in the cluster.
Yet in some enterprises, it is important to access messages remotely, across network boundaries. That is, the publishers and subscribers are in separate networks, connected by a wide-area network (WAN). Wide-area stores support this situation.
Motivation
Consider a chain of retail outlets that generate data about sales, inventory, and expenses. In each outlet, some application programs publish messages with this data, and other application programs subscribe to those messages.
With wide-area stores, application programs at corporate headquarters can also subscribe to those messages, automatically receiving the messages from the retail outlets.
Infrastructure
The durables of a wide-area store are accessible to publishers and subscribers across a WAN link.
To designate a wide-area store, set its scope to zone, and assign the store to a zone.
Persistence: Local and Wide-Area
Within each persistence cluster, a wide-area store replicates messages across the persistence services of the cluster. The persistence cluster assures message replication, retention, and delivery - subject to factors such as persistence limit parameters, store replication, the number of persistence services in the cluster, and local network connectivity. Local connectivity is sufficient to assure that messages are never lost, even if WAN connectivity is intermittent among the clusters of a zone.
Example: Wide-Area Behavior
For example, in the diagram, store S is designated as a wide-area store, and assigned for forwarding in zone Z. All the clusters in zone Z implement projections of store S (blue dashed lines). The zone type of Z is a full mesh.
Application programs in Rio, London, and Tokyo can publish and subscribe to the durables of store S, 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.
- The Delft cluster is outside of forwarding zone Z. Even though the Delft cluster implements store S, which is designated as a wide-area store of zone Z, the cluster does not forward store S, neither out from nor in to the Delft cluster.
- Store T 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 store T do not cause messages to flow in from other clusters. Publishers to store T 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 store S would still be available to durable subscribers in Rio and Tokyo.