As far as I know the incoming and outgoing messages are always the same type. Did Giraph introduce something new here? If they're the same remove incoming/outgoing and have messageClass only.