raol / amazon-sqs-net-extended-client-lib

Extension to Amazon SQS that adds support for sending and receiving messages greater than 256K
Apache License 2.0
39 stars 33 forks source link

AmazonSQSExtendedClient: Failed to get the S3 object which contains the message payload. Message was not received. #21

Closed skabariya closed 7 months ago

skabariya commented 4 years ago

Hello @raol @OlegRa

I am using sqs extended client to support large message payload,

I am using Amazon.SQS.ExtendedClient V1.0.1

In my case the message size is around 10 MB and I have check that message is stored to S3 (with some file name like 1217f4636990474f89272f382a6183aa.txt)

But it returning below error something like the file is not retrieved from the S3 I think.

I have found that the error is returning from the below file and line number is 378 or 382 I think. https://github.com/raol/amazon-sqs-net-extended-client-lib/blob/master/src/Amazon.SQS.ExtendedClient/AmazonSQSExtendedClient.cs

Here is the error log: { "@t": "2020-05-20T13:51:21.7713311Z", "@mt": "An error occurred when attempting to receive the next message: {exception}", "@l": "Warning", "exception": "Amazon.Runtime.AmazonClientException: Failed to get the S3 object which contains the message payload. Message was not received. ---> Amazon.S3.AmazonS3Exception: The specified key does not exist. ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.\n at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)\n at Amazon.Runtime.Internal.HttpHandler1.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.RedirectHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.S3.Internal.AmazonS3ResponseHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)\n --- End of inner exception stack trace ---\n at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception)\n at Amazon.Runtime.Internal.ErrorHandler.ProcessException(IExecutionContext executionContext, Exception exception)\n at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)\n at Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient.GetTextFromS3Async(String s3BucketName, String s3Key, CancellationToken cancellationToken)\n --- End of inner exception stack trace ---\n at Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient.GetTextFromS3Async(String s3BucketName, String s3Key, CancellationToken cancellationToken)\n at Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient.ReceiveMessageAsync(ReceiveMessageRequest receiveMessageRequest, CancellationToken cancellationToken)\n at Rebus.AmazonSQS.AmazonSqsTransport.Receive(ITransactionContext context, CancellationToken cancellationToken)\n at Rebus.Workers.ThreadPoolBased.ThreadPoolWorker.ReceiveTransportMessage(CancellationToken token, ITransactionContext context)", "SourceContext": "Rebus.Workers.ThreadPoolBased.ThreadPoolWorker" }`

Could you please help me out for this issue??

raol commented 4 years ago

I'd suggest you updating to the latest 1.2.1 version first. If that does not help, I will take a look.