Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Connection"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="dataType">Type of the data.</param>
 /// <param name="noOfPerformers">The no of performers.</param>
 /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
 public Connection(ConnectionName name, IAmAnInputChannel channel, Type dataType, int noOfPerformers, int timeoutInMilliseconds)
 {
     Name                 = name;
     Channel              = channel;
     DataType             = dataType;
     NoOfPeformers        = noOfPerformers;
     TimeoutInMiliseconds = timeoutInMilliseconds;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Connection"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="dataType">Type of the data.</param>
 /// <param name="noOfPerformers">The no of performers.</param>
 /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
 /// <param name="requeueCount">The number of times you want to requeue a message before dropping it</param>
 public Connection(ConnectionName name, IAmAnInputChannel channel, Type dataType, int noOfPerformers = 1, int timeoutInMilliseconds = 300, int requeueCount = -1)
 {
     RequeueCount         = requeueCount;
     Name                 = name;
     Channel              = channel;
     DataType             = dataType;
     NoOfPeformers        = noOfPerformers;
     TimeoutInMiliseconds = timeoutInMilliseconds;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Connection"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="channelFactory">The channel factory to create channels for Consumer</param>
 /// <param name="dataType">Type of the data.</param>
 /// <param name="routingKey">The routing key</param>
 /// <param name="noOfPerformers">The no of performers.</param>
 /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param>
 /// <param name="requeueCount">The number of times you want to requeue a message before dropping it</param>
 /// <param name="requeueDelayInMilliseconds">The number of milliseconds to delay the delivery of a requeue message for</param>
 /// <param name="unacceptableMessageLimit">The number of unacceptable messages to handle, before stopping reading from the channel</param>
 /// <param name="channelName">The channel name</param>
 /// <param name="isDurable">The durability of the queue</param>
 public Connection(ConnectionName name, IAmAChannelFactory channelFactory, Type dataType, ChannelName channelName, string routingKey, int noOfPerformers = 1, int timeoutInMilliseconds = 300, int requeueCount = -1, int requeueDelayInMilliseconds = 0, int unacceptableMessageLimit = 0, bool isDurable = false)
 {
     RequeueCount               = requeueCount;
     Name                       = name;
     ChannelFactory             = channelFactory;
     DataType                   = dataType;
     NoOfPeformers              = noOfPerformers;
     TimeoutInMiliseconds       = timeoutInMilliseconds;
     UnacceptableMessageLimit   = unacceptableMessageLimit;
     RequeueDelayInMilliseconds = requeueDelayInMilliseconds;
     ChannelName                = channelName;
     RoutingKey                 = routingKey;
     IsDurable                  = isDurable;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Consumer"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="messagePump">The message pump.</param>
 public Consumer(ConnectionName name, IAmAnInputChannel channel, IAmAMessagePump messagePump)
 {
     Name      = name;
     Performer = new Performer(channel, messagePump);
     State     = ConsumerState.Shut;
 }