Cannot set queue attributes

608 views
Skip to first unread message

Johan Haleby

unread,
May 21, 2013, 9:08:55 AM5/21/13
to elas...@googlegroups.com
Hi, 

First off all thanks for a good framework. I'm running into an issue when I try to configure queue attributes. The code looks something like this:

Map<String, String> attributes = sqs.getQueueAttributes(new GetQueueAttributesRequest(<queue url>).getAttributes();
          attributes.put("MessageRetentionPeriod", "92); 
sqs.setQueueAttributes(new SetQueueAttributesRequest(<queue url>, attributes));

What I'm trying to do is to change the default message retention period for the queue to 92 seconds. The code works when I'm using a real SQS server but it fails when I use ElasticMQ with the following error message:

InvalidAttributeNameException: Status Code: 400, AWS Service: AmazonSQS, AWS Request ID: 00000000-0000-0000-0000-000000000000, AWS Error Code: InvalidAttributeName, AWS Error Message: See the SQS docs.

Is this a bug or am I doing something wrong? 

Regards,
/Johan 

Adam Warski

unread,
May 22, 2013, 9:55:54 AM5/22/13
to elas...@googlegroups.com
Oops, seems support for this attribute is not yet implemented.
Thanks for the report, I'll try to include it in the next release.

Adam

--
 
---
You received this message because you are subscribed to the Google Groups "ElasticMQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticmq+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


Johan Haleby

unread,
May 27, 2013, 10:04:43 AM5/27/13
to elas...@googlegroups.com
That would be really great, thanks!

Chen Harel

unread,
Dec 16, 2014, 9:15:20 AM12/16/14
to elas...@googlegroups.com
Hi Adam, is there any update on this? run into the same issue today trying to query ApproximateNumberOfMessages

Adam Warski

unread,
Dec 17, 2014, 8:02:55 AM12/17/14
to elas...@googlegroups.com
The issues described was when setting an attribute value. Querying for ApproximateNumberOfMessages should work just fine.

Can you share some of the code which doesn’t work?

Adam

For more options, visit https://groups.google.com/d/optout.

Chen Harel

unread,
Dec 17, 2014, 8:04:21 AM12/17/14
to elas...@googlegroups.com
Hi Adam - It works perfectly well when querying. The ElasticMQ process was down when I saw these errors. When it is running, it does return the correct values :)

Thanks!

--

---
You received this message because you are subscribed to a topic in the Google Groups "ElasticMQ" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticmq/RmxP_TV1T9M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticmq+...@googlegroups.com.

Adam Warski

unread,
Dec 17, 2014, 8:10:01 AM12/17/14
to elas...@googlegroups.com
Ah I see, good to hear :) The “work when switched off” feature isn’t implemented yet ;)

Adam

Chen Harel

unread,
Dec 17, 2014, 8:11:26 AM12/17/14
to elasticmq
exactly. Glad to know the "product owner does reply to year-old threads" feature works ;)

John Franklin

unread,
Aug 13, 2016, 9:17:32 PM8/13/16
to ElasticMQ
Adam -- Has the message retention period feature been implemented?  I am trying to specify 60 seconds in custom.conf using the parameters below but it doesn't seem to have an effect. Happy to read the docs.  If this is covered, please point me to them.

-- John

        defaultVisibilityTimeout = 0 seconds

        delay = 0 seconds

        receiveMessageWait = 1 seconds

        messageRetentionPeriod = 60 seconds

Adam Warski

unread,
Aug 15, 2016, 10:54:49 PM8/15/16
to elas...@googlegroups.com
The message retention period is not currently supported:

(if it would be, you would be able to set it when creating the queue, not in elasticmq’s settings)

Adam

Adam Warski

unread,
Aug 15, 2016, 10:55:37 PM8/15/16
to elas...@googlegroups.com
Please open an issue if you’d need that: https://github.com/adamw/elasticmq/issues

Or even better, write a PR :)

Adam

On 13 Aug 2016, at 18:17, John Franklin <john.f...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages