for(Event outgoingEvent : outgoingEvents) { if(outgoingEvent instanceof HasTimestamps) { ((HasTimestamps)outgoingEvent).setProcessedTimestamp(processedTimestamp);
if(event instanceof HasTimestamps) { HasTimestamps hasTimestamps = (HasTimestamps)event; if(hasTimestamps.getProcessedTimestamp() != 0) { ((HasTimestamps)event).setProcessedTimestamp(processedTimestamp);