class MessageQueue {

  private final BlockingQueue<Message> blkQueue;

  // Default constructor when called creates Blocking Queue object. 
  public MessageQueue() {
    this.blkQueue = new ArrayBlockingQueue<>(1024);
  }

  /**
   * All the TaskGenerator threads will call this method to insert the Messages in to the Blocking
   * Queue.
   */
  public void submitMsg(Message msg) {<FILL_FUNCTION_BODY>}

  /**
   * All the messages will be retrieved by the ServiceExecutor by calling this method and process
   * them. Retrieves and removes the head of this queue, or returns null if this queue is empty.
   */
  public Message retrieveMsg() {
    try {
      return blkQueue.poll();
    } catch (Exception e) {
      LOGGER.error(e.getMessage());
    }
    return null;
  }
}

    try {
      if (null != msg) {
        blkQueue.add(msg);
      }
    } catch (Exception e) {
      LOGGER.error(e.getMessage());
    }
  
<no_super_class>