src/gluten/Aws/AmazonSqsExtensions.cs
/// <summary>
/// Receives the message contents directly, trying only once
/// and throwing timeout after a single attempt (20 seconds with current settings).
/// This makes impossible deleteing the message from the queue unless
/// the queue is deleted.
/// </summary>
/// <param name="this"></param>
/// <param name="queueUrl"></param>
/// <returns></returns>
Receives the message contents directly, trying only once
and throwing timeout after a single attempt (20 seconds with current settings).
This makes impossible deleteing the message from the queue unless
the queue is deleted.
Receives the message contents directly trying only once and throwing timeout after a single attempt ( 20 seconds with current settings ) . This makes impossible deleteing the message from the queue unless the queue is deleted .
public static string ReceiveMessageUnsafe(this IAmazonSQS @this, string queueUrl)
        {
            var request = new ReceiveMessageRequest
            {
                QueueUrl = queueUrl
            };
            var response = @this.ReceiveMessage(request);
            if (response.Messages.Count == 0)
            {
                throw new TimeoutException("No messages were received after a single long-poll operation.");
            }
            var messageBody = response.Messages[0].Body;
            return messageBody;
        }
public static string ReceiveMessageUnsafe ( this IAmazonSQS @this , string queueUrl ) { var request = new ReceiveMessageRequest { QueueUrl = queueUrl } ; var response = @this . ReceiveMessage ( request ) ; if ( response . Messages . Count == 0 ) { throw new TimeoutException ( " " ) ; } var messageBody = response . Messages [ 0 ] . Body ; return messageBody ; }
Receives the message contents directly, trying only once
and throwing timeout after a single attempt (20 seconds with current settings).
Receives the message contents directly trying only once and throwing timeout after a single attempt ( 20 seconds with current settings ) .
None
IAmazonSQS
this
queueUrl
string
None
this
None