7.7.5. Distributed Garbage Collection

7.7.5. Distributed Garbage Collection

In a JGroups cluster, all nodes have to store all messages received for potential retransmission in case of a failure. However, if we store all messages forever, we will run out of memory. So, the distributed garbage collection service in JGroups periodically purges messages that have seen by all nodes from the memory in each node. The distributed garbage collection service is configured in the pbcast.STABLE sub-element under the JGroups Config element. Here is an example configuration.

<pbcast.STABLE stability_delay="1000"
    desired_avg_gossip="5000" 
    down_thread="false" up_thread="false"
       max_bytes="400000"/>

The configurable attributes in the pbcast.STABLE element are as follows.

Note

Set the max_bytes attribute when you have a high traffic cluster.