anchor.diff:  open MassTransit.Async.Queue
   open MassTransit.Async.AsyncRetry
   
  +type internal Agent<'T> = MailboxProcessor<'T>
  +
   /// Create a new receiver, with a queue description,
   /// a factory for messaging factories and some control flow data
   type Receiver(desc   : QueueDescription,
  
positive.code:       if not(recv.IsClosed) then
          try recv.Close()
          with | x -> logger.Error("could not close receiver", x)
  
    /// Starts the receiver which starts the consuming from the service bus
    /// and creates the queue if it doesn't exist
    member x.Start () =
      logger.InfoFormat("started for queue '{0}'", desc)
      if started then ()
      else
        started <- true
        desc |> create nm |> Async.RunSynchronously
        for (mf, client) in mfAndRecvsColl do
          worker client |> Async.Start
  
    /// Stops the receiver which closes all messaging factories and message receivers 
    /// that it holds onto.
    member x.Stop () =
      logger.Info("stop called")
      if not(started) then ()
      else 
        started <- false
        Async.CancelDefaultToken ()
  
    member x.Get(timeout : TimeSpan) =
      let mutable item = null
      let _ = messages.TryTake(&item, timeout.Milliseconds)
      item
  
    member __.TryTake(?timeout) =
      let timeout = defaultArg timeout <| TimeSpan.FromMilliseconds 50.0
      let mutable item = null
      if messages.TryTake(&item, timeout.Milliseconds)
  
negative.code:               ?maxReceived : int,
                ?concurrency : int,
                ?mfEveryNthConcurrentAsync : int) =
    
    /// Field denoting whether the receiver is in the started state or, if false, in the stopped state.
    let mutable started = false
  
    /// The 'scratch' buffer that tunnels messages from the ASB receivers
    /// to the consumers of the Receiver class.
    let messages = new BlockingCollection<_>(defaultArg maxReceived 50)
    
    let logger = MassTransit.Logging.Logger.Get(typeof<Receiver>)
    let timeout = TimeSpan.FromMilliseconds 50.0
    let concurrency = defaultArg concurrency 250
    let nthAsync = defaultArg mfEveryNthConcurrentAsync 100 // in initAsyncs
    let azQDesc = desc.Inner
  
    /// creates an async workflow worker, given a message receiver client
    let worker client =
        async {
          let! cancelled = Async.CancellationToken
  