public GenericRecord deserializePayload ( byte [ ] payload , Schema payloadSchema ) throws IOException , ExecutionException { Decoder decoder = this . decoderFactory . binaryDecoder ( payload , null ) ; GenericDatumReader < GenericRecord > reader = this . readers . get ( payloadSchema ) ; return reader . read ( null , decoder ) ; }
Deserialize payload using payload schema