/// <summary> /// Initializes a new instance of the MSMQPersistTransaction class. /// </summary> /// <param name="persist">the MSMQ queue persistence.</param> public MSMQPersistTransaction(MSMQPersist persist) { if (persist == null) { throw new ArgumentNullException("persist"); } this.parentPersistField = persist; }
/// <summary> /// Callback to update MSMQ length counter /// </summary> /// <param name="state">null object</param> private void CallbackToUpdateMSMQLength(object state) { try { long requestQueueLength, responseQueueLength; MSMQPersist.GetAllSessionCounts(out requestQueueLength, out responseQueueLength); this.requestQueueLengthCounter.RawValue = requestQueueLength; this.responseQueueLengthCounter.RawValue = responseQueueLength; } catch (Exception e) { TraceHelper.TraceEvent(TraceEventType.Error, "[BrokerManager] Failed update MSMQ length: {0}", e); } }