Now the logic is basically copy paste in `MemoryEventProcessor` and `DynamoDBEventProcessor`. It'd be nice to abstract the shared parts.