/// <summary>
        /// Sends a collection of messages inside a batch transaction
        /// </summary>
        /// <param name="messages"></param>
        public void SendBatch(IEnumerable <Envelope <Stream> > messages)
        {
            SendMessageBatchRequest msgRequest = AmazonSQSMessageConverter.ConstructMessage(messages);

            msgRequest.QueueUrl = QueueName;

            _client.SendMessageBatch(msgRequest);
        }
        /// <summary>
        /// Sends a message using the metadata in the envelope if applicable
        /// </summary>
        /// <param name="message"></param>
        public void Send(Envelope <Stream> message)
        {
            SendMessageRequest msgRequest = AmazonSQSMessageConverter.ConstructMessage(message);

            msgRequest.QueueUrl = QueueName;

            _client.SendMessage(msgRequest);
        }
Example #3
0
        public Task ProcessRecieveMessage(Message message)
        {
            Envelope <Stream> envelope = AmazonSQSMessageConverter.ConstructEnvelope(message);
            Task messageProcess        = Task.Run(() =>
            {
                MessageReleaseAction releaseResult = InvokeMessageHandler(envelope);

                CompleteMessage(message, releaseResult);
            });

            return(messageProcess);
        }