anchor.diff:      static member AffinityProperty = "worker"
       /// ParentTaskId.
       static member ParentTaskIdProperty = "parentId"
  -    /// Stream offset.
  -    static member StreamOffsetProperty = "offset"
  +    /// BatchIndex.
  +    static member BatchIndexProperty = "batchIndex"
       /// JobId.
       static member JobIdProperty = "uuid"
       /// SUbscription queue auto delete interval.
  
positive.code:                 let affinity = tryGet Settings.AffinityProperty
                  let deliveryCount = message.DeliveryCount
                  let parentId = fromGuid (message.Properties.[Settings.ParentTaskIdProperty] :?> Guid)
                  let streamPos = tryGet Settings.StreamOffsetProperty
                  let lockToken = message.LockToken
                  let body = fromGuid (message.GetBody<Guid>())
                  let jobId = message.Properties.[Settings.JobIdProperty] :?> Guid
  
negative.code:             newRecord.FaultInfo <- nullable(int FaultInfo.NoFault)
              newRecord.ETag <- "*"
              let! _record = Table.merge config config.RuntimeTable newRecord
              logger.Logf LogLevel.Debug "job:%O : enqueue completed, size %s" job.Id (getHumanReadableByteSize blob.Size)
          }
  
      static member EnqueueBatch(config : ConfigurationId, logger : ISystemLogger, jobs : CloudJob [], sendF : BrokeredMessage seq -> Task) =
          async { 
              if jobs.Length = 0 then return () else
              let taskId = jobs.[0].TaskEntry.Id // this is a valid assumption for all uses
              let records = jobs |> Seq.map JobRecord.FromCloudJob
              do! Table.insertBatch config config.RuntimeTable records
  
              let blobName = guid()
              let! blob = Blob.Create(config, taskId, blobName, fun () -> jobs)
              let size = blob.Size
  
              let mkJobMessage (i : int) (job : CloudJob) =
                  let msg = new BrokeredMessage(toGuid blobName)
                  msg.Properties.Add(Settings.JobIdProperty, job.Id)
                  msg.Properties.Add(Settings.ParentTaskIdProperty, toGuid job.TaskEntry.Id)
                  msg.Properties.Add(Settings.BatchIndexProperty, i)
                  match job.TargetWorker with
                  | Some target -> msg.Properties.Add(Settings.AffinityProperty, target.Id)
                  | _ -> ()
                  msg
  
              let messages = jobs |> Array.mapi mkJobMessage
              do! sendF messages
  
              let now = DateTimeOffset.Now
              let newRecords = 
                  records |> Seq.map (fun r -> 
                      let newRec = r.CloneDefault()
                      newRec.ETag <- "*"
                      newRec.Status <- nullable(int JobStatus.Enqueued)
                      newRec.EnqueueTime <- nullable now
                      newRec.FaultInfo <- nullable(int FaultInfo.NoFault)
                      newRec.Size <- nullable(size)
                      newRec)
  
              return! Table.mergeBatch config config.RuntimeTable newRecords
              logger.Logf LogLevel.Info "Enqueued batched jobs of %d items for task %s, total size %s." jobs.Length taskId (getHumanReadableByteSize size)
          }
      
  
  