Universal Messaging 10.3 | Concepts | Deployment | Server | Data Routing using Interest Propagation
Data Routing using Interest Propagation
Universal Messaging offers the ability to forward data received on one independent realm or cluster to many other independent realms or clusters, which may reside in geographically distinct locations. Traditionally this is done using the Join mechanism, which will forward all events from one channel to another.
There is an alternative mechanism, namely Interest Propagation. This mechanism expands upon the functionality provided by joins by providing the ability to forward events only when there are subscribers to a channel of the same name on the remote realm or cluster. Forwarding only events which have an active subscription reduces the number of events and bandwidth used on these links.
Realms and clusters keep track of interest on remote realms that they have a direct connection to. This means that beyond the initial setup of a channel, no further configuration is required.
Managing Remote Interest using the Administrative API
Managing interest on a remote realm is done programmatically using the Universal Messaging Administrative API. Each channel present on a realm or cluster can be linked to a pair of attributes canSend and canReceive.
Enabling the canReceive attribute on a channel of a realm or cluster will enable this realm or cluster to receive information on the given channel from other directly connected realms or clusters that have a channel of the same name. The realm or cluster notifies all connected realms when this attribute changes for a given channel.
Data is only forwarded from a realm or cluster to a remote realm or cluster if all of the following conditions are met:
*A channel with the same name exists on the remote realm or cluster, and
*the canReceive flag is enabled for the remote channel, and
*there is an active subscription present on the remote channel
Enabling the canSend attribute on a channel in a realm or cluster will enable this realm or cluster to begin forwarding data to other realms or clusters it is aware of. Data is forwarded to every realm which the source realm is aware of that has a channel with the same name and is able to receive the event (it has the canReceive flag enabled and has an interested subscriber).
Sample Usage
Universal Messaging comes with a sample application called interestmanagerutility. This is an application which takes a series of commands to manage the interest properties for a given set of realms.