Closed Bartosz-Modento closed 2 years ago
Hi Bartosz,
Can you run your code with
mySqs = SQS(..., middlewares: [AWSLoggingMiddleware()])
and report back the console output you are getting.
Thank you
Also when you say "5.10 (latest from GitHub main branch)". Do you mean v5.10 or the main branch. The main branch has moved on considerably from v5.10.
Hi Bartosz,
Can you run your code with
mySqs = SQS(..., middlewares: [AWSLoggingMiddleware()])
Can't build with that:
let mySqs = SQS(client: myClient, region:myRegion, middlewares: [AWSLoggingMiddleware()])
Got error:
Extra argument 'middlewares' in call
from Xcode
Ps. Same in line with:
guard let queues = myQueues.queueUrls else {
got:
Type of expression is ambiguous without more context
Sorry that should be
let mySqs = SQS(client: myClient, region:myRegion).with(middlewares: [AWSLoggingMiddleware()])
I see your issue. It looks like the sqs service model files are not up to date. I will add a patch
Looks ok, I assume you only need the data? Headers won't be needed, are they? (http 200 etc)
<GetQueueAttributesResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/">
<GetQueueAttributesResult>
<Attribute><Name>QueueArn</Name> <Value>arn:aws:sqs:us-west-2:blablabla</Value></Attribute>
<Attribute><Name>ApproximateNumberOfMessages</Name><Value>0</Value></Attribute>
<Attribute><Name>ApproximateNumberOfMessagesNotVisible</Name><Value>0</Value></Attribute>
<Attribute><Name>ApproximateNumberOfMessagesDelayed</Name><Value>0</Value></Attribute>
<Attribute><Name>CreatedTimestamp</Name><Value>1592592908</Value></Attribute>
<Attribute><Name>LastModifiedTimestamp</Name><Value>1601472090</Value></Attribute>
<Attribute><Name>VisibilityTimeout</Name><Value>120</Value></Attribute>
<Attribute><Name>MaximumMessageSize</Name><Value>256000</Value></Attribute>
<Attribute><Name>MessageRetentionPeriod</Name><Value>345600</Value></Attribute>
<Attribute><Name>DelaySeconds</Name><Value>0</Value></Attribute>
<Attribute><Name>ReceiveMessageWaitTimeSeconds</Name><Value>20</Value></Attribute>
<Attribute><Name>SqsManagedSseEnabled</Name><Value>false</Value></Attribute>
</GetQueueAttributesResult><ResponseMetadata>
<RequestId>4ca74f21-68b3-5884-a0ff-15366fe132a7</RequestId></ResponseMetadata></GetQueueAttributesResponse>
There is a fix in #561. If you use the branch sqs-managed-sse-enabled
your code should work
Works fine, thank you.
This is in release 5.11.0
Describe the bug I need all values from Amazon SQS but when use
SQS.QueueAttributeName.all
got error:After change to eg.
SQS.QueueAttributeName.approximatenumberofmessages
works fineTo Reproduce Steps to reproduce the behavior:
Expected behavior Return all queue attributes.
Setup (please complete the following information):
Additional context Although I am just learning Swift and I do it as part of training and maybe I am doing something wrong, but ... I can easily extract the same data either manually by awscli or in a similar application written in golang or python.