Handle encoding and decoding RpbIndexReq and RpbIndexResp.