Beispiel #1
0
 public AmazonSqsReceiveContext(Message transportMessage, bool redelivered, SqsReceiveEndpointContext context,
                                ClientContext clientContext, ReceiveSettings receiveSettings, ConnectionContext connectionContext)
     : base(redelivered, context, receiveSettings, clientContext, connectionContext)
 {
     _clientContext   = clientContext;
     _receiveSettings = receiveSettings;
     TransportMessage = transportMessage;
 }
 public AmazonSqsReceiveContext(Message transportMessage, bool redelivered, SqsReceiveEndpointContext context,
                                ClientContext clientContext, ReceiveSettings receiveSettings, params object[] payloads)
     : base(redelivered, context, payloads)
 {
     _clientContext   = clientContext;
     _receiveSettings = receiveSettings;
     TransportMessage = transportMessage;
 }
        public SqsReceiveTransport(IAmazonSqsHost host, ReceiveSettings settings, IPipe <ConnectionContext> connectionPipe,
                                   SqsReceiveEndpointContext receiveEndpointContext)
        {
            _host     = host;
            _settings = settings;
            _receiveEndpointContext = receiveEndpointContext;
            _connectionPipe         = connectionPipe;

            _inputAddress = receiveEndpointContext.InputAddress;
        }
        public SqsReceiveTransport(IAmazonSqsHostConfiguration hostConfiguration, ReceiveSettings settings, IPipe <ConnectionContext> connectionPipe,
                                   SqsReceiveEndpointContext context)
        {
            _hostConfiguration = hostConfiguration;
            _settings          = settings;
            _context           = context;
            _connectionPipe    = connectionPipe;

            _inputAddress = context.InputAddress;
        }
Beispiel #5
0
        /// <summary>
        /// The basic consumer receives messages pushed from the broker.
        /// </summary>
        /// <param name="client">The model context for the consumer</param>
        /// <param name="context">The topology</param>
        public AmazonSqsMessageReceiver(ClientContext client, SqsReceiveEndpointContext context)
        {
            _client  = client;
            _context = context;

            _receiveSettings = client.GetPayload <ReceiveSettings>();

            _deliveryComplete = TaskUtil.GetTask <bool>();

            _dispatcher = context.CreateReceivePipeDispatcher();
            _dispatcher.ZeroActivity += HandleDeliveryComplete;

            Task.Run(Consume);
        }
Beispiel #6
0
        public AmazonSqsReceiveContext(Message transportMessage, bool redelivered, SqsReceiveEndpointContext context,
                                       ClientContext clientContext, ReceiveSettings receiveSettings, ConnectionContext connectionContext)
            : base(redelivered, context, receiveSettings, clientContext, connectionContext)
        {
            _context         = context;
            _clientContext   = clientContext;
            _receiveSettings = receiveSettings;
            TransportMessage = transportMessage;

            _activeTokenSource = new CancellationTokenSource();
            _locked            = true;

            Task.Factory.StartNew(RenewMessageVisibility, _activeTokenSource.Token, TaskCreationOptions.None, TaskScheduler.Default);
        }
        /// <summary>
        /// The basic consumer receives messages pushed from the broker.
        /// </summary>
        /// <param name="client">The model context for the consumer</param>
        /// <param name="inputAddress">The input address for messages received by the consumer</param>
        /// <param name="context">The topology</param>
        public AmazonSqsBasicConsumer(ClientContext client, Uri inputAddress, SqsReceiveEndpointContext context)
        {
            _client       = client;
            _inputAddress = inputAddress;
            _context      = context;

            _tracker = new DeliveryTracker(HandleDeliveryComplete);

            _receiveSettings = client.GetPayload <ReceiveSettings>();

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

            _deliveryComplete = TaskUtil.GetTask <bool>();

            SetReady();
        }
        /// <summary>
        /// The basic consumer receives messages pushed from the broker.
        /// </summary>
        /// <param name="client">The model context for the consumer</param>
        /// <param name="context">The topology</param>
        public AmazonSqsBasicConsumer(ClientContext client, SqsReceiveEndpointContext context)
        {
            _client  = client;
            _context = context;

            _receiveSettings = client.GetPayload <ReceiveSettings>();

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

            _deliveryComplete = TaskUtil.GetTask <bool>();

            _dispatcher = context.CreateReceivePipeDispatcher();
            _dispatcher.ZeroActivity += HandleDeliveryComplete;

            SetReady();
        }
 public AmazonSqsConsumerFilter(SqsReceiveEndpointContext context)
 {
     _context = context;
 }
 public AmazonSqsReceiveContext(Uri inputAddress, Message transportMessage, bool redelivered, SqsReceiveEndpointContext context)
     : base(inputAddress, redelivered, context)
 {
     TransportMessage = transportMessage;
 }
 public AmazonSqsReceiveContext(Uri inputAddress, Message transportMessage, bool redelivered, SqsReceiveEndpointContext context,
                                params object[] payloads)
     : base(inputAddress, redelivered, context, payloads)
 {
     TransportMessage = transportMessage;
 }