public AmazonSqsConsumerFilter(IPipe <ReceiveContext> receivePipe, IReceiveObserver receiveObserver, IReceiveTransportObserver transportObserver,
                                AmazonSqsReceiveEndpointContext context, IDeadLetterTransport deadLetterTransport, IErrorTransport errorTransport)
 {
     _receivePipe         = receivePipe;
     _receiveObserver     = receiveObserver;
     _transportObserver   = transportObserver;
     _context             = context;
     _deadLetterTransport = deadLetterTransport;
     _errorTransport      = errorTransport;
 }
        public AmazonSqsReceiveTransport(IAmazonSqsHost host, ReceiveSettings settings, IPipe <ConnectionContext> connectionPipe,
                                         AmazonSqsReceiveEndpointContext context, ReceiveObservable receiveObservable, ReceiveTransportObservable receiveTransportObservable)
        {
            _host           = host;
            _settings       = settings;
            _context        = context;
            _connectionPipe = connectionPipe;

            _receiveObservable          = receiveObservable;
            _receiveTransportObservable = receiveTransportObservable;

            _inputAddress = context.InputAddress;
        }
        /// <summary>
        /// The basic consumer receives messages pushed from the broker.
        /// </summary>
        /// <param name="model">The model context for the consumer</param>
        /// <param name="queueUrl"></param>
        /// <param name="inputAddress">The input address for messages received by the consumer</param>
        /// <param name="receivePipe">The receive pipe to dispatch messages</param>
        /// <param name="receiveObserver">The observer for receive events</param>
        /// <param name="context">The topology</param>
        /// <param name="deadLetterTransport"></param>
        /// <param name="errorTransport"></param>
        public AmazonSqsBasicConsumer(ModelContext model, string queueUrl, Uri inputAddress, IPipe <ReceiveContext> receivePipe,
                                      IReceiveObserver receiveObserver, AmazonSqsReceiveEndpointContext context,
                                      IDeadLetterTransport deadLetterTransport, IErrorTransport errorTransport)
        {
            _model               = model;
            _queueUrl            = queueUrl;
            _inputAddress        = inputAddress;
            _receivePipe         = receivePipe;
            _receiveObserver     = receiveObserver;
            _context             = context;
            _deadLetterTransport = deadLetterTransport;
            _errorTransport      = errorTransport;

            _tracker = new DeliveryTracker(HandleDeliveryComplete);

            _receiveSettings = model.GetPayload <ReceiveSettings>();

            _pending = new ConcurrentDictionary <string, AmazonSqsReceiveContext>();

            _deliveryComplete = new TaskCompletionSource <bool>();

            SetReady();
        }
Beispiel #4
0
 public AmazonSqsReceiveContext(Uri inputAddress, Message transportMessage, bool redelivered, IReceiveObserver observer, AmazonSqsReceiveEndpointContext context)
     : base(inputAddress, redelivered, observer, context)
 {
     _transportMessage = transportMessage;
     _context          = context;
 }