예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// Use this if you need to override the logger in tests.
 /// </summary>
 /// <param name="queueName">The queue name.</param>
 /// <param name="routingKey">The routing key.</param>
 /// <param name="isDurable"></param>
 /// <param name="logger">The logger.</param>
 public RmqMessageConsumer(string queueName, string routingKey, bool isDurable, ILog logger) : base(logger)
 {
     _queueName      = queueName;
     _routingKey     = routingKey;
     _isDurable      = isDurable;
     _messageCreator = new RmqMessageCreator(logger);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="queueName">The queue name.</param>
 /// <param name="routingKey">The routing key.</param>
 /// <param name="isDurable"></param>
 /// <param name="logger">The logger.</param>
 public RmqMessageConsumer(string queueName, string routingKey, bool isDurable, ILog logger) : base(logger)
 {
     _queueName = queueName;
     _routingKey = routingKey;
     _isDurable = isDurable;
     _messageCreator = new RmqMessageCreator(logger);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="queueName">The queue name.</param>
 /// <param name="routingKey">The routing key.</param>
 /// <param name="isDurable">Is the queue persisted to disk</param>
 /// <param name="preFetchSize">0="Don't send me a new message until I?ve finished",  1= "Send me one message at a time", n = number to grab (take care with competing consumers)</param>
 /// <param name="highAvailability"></param>
 public RmqMessageConsumer(
     RmqMessagingGatewayConnection connection,
     string queueName,
     string routingKey,
     bool isDurable,
     ushort preFetchSize   = 1,
     bool highAvailability = false)
     : base(connection)
 {
     _queueName    = queueName;
     _routingKey   = routingKey;
     _isDurable    = isDurable;
     _preFetchSize = preFetchSize;
     IsQueueMirroredAcrossAllNodesInTheCluster = highAvailability;
     _messageCreator = new RmqMessageCreator();
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 public RmqMessageConsumer(ILog logger) : base(logger)
 {
     messageCreator = new RmqMessageCreator(logger);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 public RMQServerRequestHandler(ILog logger) : base(logger)
 {
     messageCreator = new RmqMessageCreator(logger);
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="connection"></param>
 /// <param name="queueName">The queue name.</param>
 /// <param name="routingKey">The routing key.</param>
 /// <param name="isDurable">Is the queue persisted to disk</param>
 /// <param name="preFetchSize">0="Don't send me a new message until I?ve finished",  1= "Send me one message at a time", n = number to grab (take care with competing consumers)</param>
 /// <param name="highAvailability"></param>
 public RmqMessageConsumer(
     RmqMessagingGatewayConnection connection, 
     string queueName, 
     string routingKey, 
     bool isDurable, 
     ushort preFetchSize = 1, 
     bool highAvailability = false) 
     : base(connection)
 {
     _queueName = queueName;
     _routingKey = routingKey;
     _isDurable = isDurable;
     _preFetchSize = preFetchSize;
     IsQueueMirroredAcrossAllNodesInTheCluster = highAvailability;
     _messageCreator = new RmqMessageCreator();
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageGateway" /> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 public RmqMessageConsumer(string queueName, string routingKey, ILog logger) : base(logger)
 {
     this.queueName  = queueName;
     this.routingKey = routingKey;
     messageCreator  = new RmqMessageCreator(logger);
 }