Configuring Peer-to-Peer Event Messaging
You can receive events from cluster peers for any region that is not a local region. Local regions receive only local cache events.
- Replicated regions always receive all events from peers and require no further configuration. Replicated regions are configured using the
REPLICATEregion shortcut settings.
For non-replicated regions, decide whether you want to receive all entry events from the distributed cache or only events for the data you have stored locally. To configure:
To receive all events, set the
<region-attributes> <subscription-attributes interest-policy="all"/> </region-attributes>
To receive events just for the data you have stored locally, set the
cache-contentor do not set it (
cache-contentis the default):
<region-attributes> <subscription-attributes interest-policy="cache-content"/> </region-attributes>
For partitioned regions, this only affects the receipt of events, as the data is stored according to the region partitioning. Partitioned regions with interest policy of
allcan create network bottlenecks, so if you can, run listeners in every member that hosts the partitioned region data and use the
Note: You can also configure Regions using the gfsh command-line interface. See Region Commands.