code: public HttpMessage getHttpMessage() throws HttpMalformedHeaderException, DatabaseException {
  		if (httpMessage != null) {
  			return httpMessage;
  		}
  
  		// fetch complete message
  		RecordHistory history = staticTableHistory.read(historyId);
  		if (history == null) {
  			throw new HttpMalformedHeaderException("No history reference for id " + historyId + " type=" + historyType);
  		}
  		// ZAP: Init HttpMessage HistoryReference field
  		history.getHttpMessage().setHistoryRef(this);
  		return history.getHttpMessage();
  	}
docs: Gets the corresponding http message from the database. Try to minimise calls to this method as much as possible.
  But also dont cache the HttpMessage either as this can significantly increase ZAP's memory usage.
  
  @return the http message
  @throws HttpMalformedHeaderException the http malformed header exception
  @throws SQLException the sQL exception