Пример #1
0
        public async Task <SendMessageResponse> SendMessageToSqsQueue(TicketRequest request)
        {
            SendMessageRequest sendMessageRequest = new SendMessageRequest
            {
                QueueUrl    = "https://sqs.eu-west-1.amazonaws.com/891123523376/TicketRequest",
                MessageBody = request.Serialize(request)
            };

            return(await _amazonSqsClient.SendMessageAsync(sendMessageRequest));
        }
Пример #2
0
        public async Task <SendMessageResponse> SendMessageToSqsQueue(TicketRequest request)
        {
            var sendMessageRequest = new SendMessageRequest
            {
                //demo
                QueueUrl    = "https://sqs.us-east-1.amazonaws.com/.../sqs_name",
                MessageBody = request.Serialize()
            };

            return(await SqsClient.SendMessageAsync(sendMessageRequest));
        }
        public async Task <SendMessageResponse> SendMessageToSqsQueue(TicketRequest request)
        {
            var sendMessageRequest = new SendMessageRequest()
            {
                QueueUrl    = @"https://sqs.us-west-2.amazonaws.com/959393741857/TicketRequest",
                MessageBody = request.Serialize()
            };

            var response = await _amazonSQS.SendMessageAsync(sendMessageRequest);

            return(response);
        }
Пример #4
0
        public async Task <TicketResponse> SendMessageToSqsQueue(TicketRequest request)
        {
            var sendMessageRequest = new SendMessageRequest
            {
                QueueUrl    = QueueUrl,
                MessageBody = request.Serialize(request)
            };

            var response = await _amazonSqsClient.SendMessageAsync(sendMessageRequest);

            return(new TicketResponse
            {
                MessageId = response.MessageId
            });
        }