EnsurePipeExists() public method

public EnsurePipeExists ( string pipeTitle, string routingKey, paramore.brighter.commandprocessor.messaginggateway.restms.Model.RestMSDomain domain ) : void
pipeTitle string
routingKey string
domain paramore.brighter.commandprocessor.messaginggateway.restms.Model.RestMSDomain
return void
コード例 #1
0
 /// <summary>
 /// Noes the of outstanding messages.
 /// </summary>
 /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
 /// <returns>System.Int32.</returns>
 public int NoOfOutstandingMessages(int timeoutInMilliseconds = -1)
 {
     try
     {
         _pipe.EnsurePipeExists(_queueName, _routingKey, _domain.GetDomain());
         var pipe = _pipe.GetPipe();
         return(pipe.Messages != null?pipe.Messages.Count() : 0);
     }
     catch (RestMSClientException rmse)
     {
         Logger.ErrorFormat("Error sending to the RestMS server: {0}", rmse.ToString());
         throw;
     }
     catch (HttpRequestException he)
     {
         Logger.ErrorFormat("HTTP error on request to the RestMS server: {0}", he.ToString());
         throw;
     }
 }
コード例 #2
0
        /// <summary>
        /// Receives the specified queue name.
        /// </summary>

        /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
        /// <returns>Message.</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public Message Receive(int timeoutInMilliseconds = -1)
        {
            try
            {
                _feed.EnsureFeedExists(_domain.GetDomain());
                _pipe = new Pipe(this, _feed);
                _pipe.EnsurePipeExists(_queueName, _routingKey, _domain.GetDomain());

                return(ReadMessage());
            }
            catch (RestMSClientException rmse)
            {
                Logger.ErrorFormat("Error sending to the RestMS server: {0}", rmse.ToString());
                throw;
            }
            catch (HttpRequestException he)
            {
                Logger.ErrorFormat("HTTP error on request to the RestMS server: {0}", he.ToString());
                throw;
            }
        }
コード例 #3
0
        /// <summary>
        /// Receives the specified queue name.
        /// </summary>

        /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
        /// <returns>Message.</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public Message Receive(int timeoutInMilliseconds = -1)
        {
            try
            {
                _feed.EnsureFeedExists(_domain.GetDomain());
                _pipe = new Pipe(this, _feed);
                _pipe.EnsurePipeExists(_queueName, _routingKey, _domain.GetDomain());

                return ReadMessage();
            }
            catch (RestMSClientException rmse)
            {
                _logger.Value.ErrorFormat("Error sending to the RestMS server: {0}", rmse.ToString());
                throw;
            }
            catch (HttpRequestException he)
            {
                _logger.Value.ErrorFormat("HTTP error on request to the RestMS server: {0}", he.ToString());
                throw;
            }
        }