When empty accessor regions are used on the gateway sender members, the remove-all events are not propagating into the gateway sender members and thus not being sent to the downstream clusters. All other event types work correctly.
Here is an example scenario, which doesn't work as expected.
1. Client connects to Server1 hosting region1 (data policy = replicated)
2. Server1 forwards events to Server2, which is hosting region1 (data policy = empty, interest policy = all)
3. Server2 has a serial gateway sender that forwards events to a downstream cluster
4. Server2 gets events as expected except for REMOVEALL_DESTROY
This applies to all GemFire Versions.
This is under the Engineering Review
Please subscribe to this article for updates.
Here is a simple workaround, to resolve the issue.
Attach a cache listener to an empty region. This will force removeAll events to be delivered as expected. An example of how to do this is listed below.
cache.xml:
```
<region name="example-region">
<region-attributes gateway-sender-ids="cluster2-sender" data-policy="empty" scope="distributed-ack">
<subscription-attributes interest-policy="all" />
<cache-listener>
<class-name>org.example.EmptyListener</class-name>
</cache-listener>
</region-attributes>
</region>
```
Listener:
```
package org.example;
import org.apache.geode.cache.util.CacheListenerAdapter;
public class EmptyListener extends CacheListenerAdapter {
}
```