In the previous Hazelcast releases, WAN replication was dropping the new events if WAN replication event queues are full. This behavior is configurable starting with Hazelcast 3.6.
There are two different supported behaviors:
-
DISCARD_AFTER_MUTATION
: If you select this option, the new WAN events generated by the member are dropped and not replicated to the target cluster when the WAN event queues are full. -
THROW_EXCEPTION
: If you select this option, the WAN queue size is checked before each supported mutating operation (likeIMap#put
,ICache#put
). If one the queues of target cluster is full,WANReplicationQueueFullException
is thrown and the operation is not allowed. -
THROW_EXCEPTION_ONLY_IF_REPLICATION_ACTIVE
: Its effect is similar to that ofTHROW_EXCEPTION
. But, it throws exception only when WAN replication is active. It discards the new events if WAN replication is stopped.
The following is an example configuration:
<wan-replication name="my-wan-cluster">
<wan-publisher group-name="test-cluster-1">
...
<queue-full-behavior>DISCARD_AFTER_MUTATION</queue-full-behavior>
</wan-publisher>
</wan-replication>
NOTE: queue-full-behavior
configuration is optional. Its default value is DISCARD_AFTER_MUTATION
.