コード例 #1
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);
		}
コード例 #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);
        }
コード例 #3
0
ファイル: Publication.cs プロジェクト: bstack/PMCG.Messaging
        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");
            }
        }