private void resetLastPeekedEvents() {
    batchIdToEventsMap.clear();
    // make sure that when there is problem while receiving ack, pdx gateway
    // sender events isDispatched is set to false so that same events will be
    // dispatched in next batch
    for (Map.Entry<Integer, List<GatewaySenderEventImpl>> entry : batchIdToPDXEventsMap
        .entrySet()) {
      for (GatewaySenderEventImpl event : entry.getValue()) {
        event.isDispatched = false;
      }
    }
    batchIdToPDXEventsMap.clear();
    if (queue instanceof SerialGatewaySenderQueue) {
      ((SerialGatewaySenderQueue) queue).resetLastPeeked();
    } else if (queue instanceof ParallelGatewaySenderQueue) {
      ((ParallelGatewaySenderQueue) queue).resetLastPeeked();
    } else {
      // we will never come here
      throw new RuntimeException("resetLastPeekedEvents : no matching queue found " + this);
    }
  }
Mark all PDX types as requiring dispatch so that they will be sent over the connection again.
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java