code: private void handleRequestSuccess(long requestId, Object response, ThreadContext context) {
      ByteBuf buffer = channel.alloc().buffer(10)
        .writeByte(RESPONSE)
        .writeLong(requestId)
        .writeByte(SUCCESS);
  
      try {
        writeResponse(buffer, response, context);
      } catch (SerializationException e) {
        handleRequestFailure(requestId, e, context);
        return;
      }
  
      channel.writeAndFlush(buffer, channel.voidPromise());
  
      if (response instanceof ReferenceCounted) {
        ((ReferenceCounted) response).release();
      }
    }
docs: Handles a request response.