title: Outgoing message queue for MVC
body: <p>All of my FW/1 controllers extend extend base.cfc. In base.cfc there is a function called <strong>addMessage()</strong>. Messages are  thing like "You have successfully logged in". "There is an error in your data", "Error occurred while processing request.</p>
  
  <p>The <strong>addMessage()</strong> appends messages to a variable called <code>request.arMessage</code> (an array). When I get to the layout file, the layout file loops through all the message and displays them on the page.</p>
  
  <p>I am considering replacing <code>request.arMessage</code> with request.qryMessage. That way I can run a QoQ and sort by severity as opposed to last in last out. See below</p>
  
  <pre><code>void function addMessage(required string message, numeric priority=0) output="false"    {
  
  param request.qryMessageQueue = QueryNew("Priority,Message", "integer,varchar");
  
  QueryAddRow(request.qryMessageQueue);
  QuerySetCell(request.qryMessageQueue, "Priority", arguments.priority);
  QuerySetCell(request.qryMessageQueue, "Message", trim(arguments.message));
  }
  </code></pre>
  
  <p>Is this approach consistent with how MVC and FW/1 should be doing this?</p>