   """
   @spec track(Map) :: term
   def track(%{subscription_handler: subscription_handler, delivery_tag: delivery_tag} = _async_info) do
+    Logger.debug("#{@logprefix} Tracking message #{delivery_tag}...")    
     new_message = %{
       process: self(),
       subscription_handler: subscription_handler, 

      start_time: :calendar.universal_time
    }

    messages = Agent.get(__MODULE__, fn messages -> messages end)
    messages = Map.put(messages, delivery_tag, new_message)

    # workload = Enum.reduce Map.keys(messages), [], fn(delivery_tag, workload) ->
    #   workload ++ [%{
    #     description: "Request:  #{delivery_tag}"
    #   }]
    # end
    #Heartbeat.set_workload(workload)

    Agent.update(__MODULE__, fn _ -> messages end)

    new_message
  end



defmodule OpenAperture.Deployer.MessageManager do

  @logprefix "[MessageManager]"

  @moduledoc """
  This module contains the logic for associating message references with their subscription handlers
