public PublicationResult(
     PublicationResultStatus status,
     Message message)
 {
     this.Status  = status;
     this.Message = message;
 }
Beispiel #2
0
		public void SetResult(
			PublicationResultStatus status,
			string context = null)
		{
			var _publicationResult = new PublicationResult(this.c_configuration, this.c_message, status, context);
			this.c_result.SetResult(_publicationResult);
		}
		public PublicationResult(
			PublicationResultStatus status,
			Message message)
		{
			this.Status = status;
			this.Message = message;
		}
Beispiel #4
0
        public void SetResult(
            PublicationResultStatus status,
            string context = null)
        {
            var _publicationResult = new PublicationResult(this.c_configuration, this.c_message, status, context);

            this.c_result.SetResult(_publicationResult);
        }
Beispiel #5
0
 public PublicationResult(
     MessageDelivery configuration,
     Message message,
     PublicationResultStatus status,
     string statusContext = null)
 {
     this.Configuration = configuration;
     this.Message       = message;
     this.Status        = status;
     this.StatusContext = statusContext;
 }
		public PublicationResult(
			MessageDelivery configuration,
			Message message,
			PublicationResultStatus status,
			string statusContext = null)
		{
			this.Configuration = configuration;
			this.Message = message;
			this.Status = status;
			this.StatusContext = statusContext;
		}
Beispiel #7
0
 private void PrepareForTransition(
     PublicationResultStatus preEmptiveCompletionStatus)
 {
     base.ConnectionManager.Blocked      -= this.OnConnectionBlocked;
     base.ConnectionManager.Disconnected -= this.OnConnectionDisconnected;
     this.c_cancellationTokenSource.Cancel();
     this.c_publicationQueue.CompleteAdding();
     foreach (var _publication in this.c_publicationQueue)
     {
         _publication.SetResult(preEmptiveCompletionStatus);
     }
 }
Beispiel #8
0
        public void SetResult(
            PublicationResultStatus status,
            string context = null)
        {
            var _publicationResult = new PublicationResult(this.c_configuration, this.c_message, status, context);

            // We had to try setting the result here as we had a race condition issue as when a channel shuts down, we set all PublicationResults for all unconfirmed publications
            // that is less than the highest delivery tag value to ChannelShutdown. However at the same time, sometimes under high load we see the odd ChannelAck returning for the same
            // PublicationResult that has already been previously set to ChannelShutdown. Hence we have an edge case where we try to set the result for a Publication whose result has already
            // been set. If this edge case occurs, we simply log that it occurred as it has no negative effect for the calling client anyway i.e. the calling client will have already received
            // a response back from the library due to ChannelShutdown first and will no longer be waiting.
            if (!this.c_result.TrySetResult(_publicationResult))
            {
                this.c_logger.Warn("SetResult TrySetResult unsuccessful for PublicationResult. Likelihood is that Task was already set due to ChannelShutdown");
            }
        }
Beispiel #9
0
 public BusPublishersConsumersSeamMock(
     PublicationResultStatus publicationResultStatus)
 {
     this.c_publicationResultStatus = publicationResultStatus;
 }