softwaremill / softwaremill/elasticmq

Needs clarification ...

Open
#761 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.9k
Forks
203
Avg merge
1d 7h
Merged PRs (30d)
6

Description

When I set the parameter waitTimeSeconds for the receiveMessage ElasticMac returns an error

'InvalidParameterValue; see the SQS docs.'

But I have not found any way to configure this parameter,

Only this ReceiveMessageWaitTimeSeconds from createQueue(SDK v2) however, this produces the same error when I call createQueue:

export type QueueAttributeName = "All"|"Policy"|"VisibilityTimeout"|"MaximumMessageSize"|"MessageRetentionPeriod"|"ApproximateNumberOfMessages"|"ApproximateNumberOfMessagesNotVisible"|"CreatedTimestamp"|"LastModifiedTimestamp"|"QueueArn"|"ApproximateNumberOfMessagesDelayed"|"DelaySeconds"|"ReceiveMessageWaitTimeSeconds"|"RedrivePolicy"|"FifoQueue"|"ContentBasedDeduplication"|"KmsMasterKeyId"|"KmsDataKeyReusePeriodSeconds"|"DeduplicationScope"|"FifoThroughputLimit"|"RedriveAllowPolicy"|"SqsManagedSseEnabled"|string;

I'm not clear how to unlock this condition ...

Snipped to reproduce the condition:

    const createParams: AWS.SQS.Types.CreateQueueRequest = {
      QueueName: 'http://elasticmq:9324/queue/test_queue",
      Attributes: {
        DelaySeconds: '0',
        MessageRetentionPeriod: '86400',
      },
    };
    const result = await sqs.createQueue(createParams).promise();
    if (result.$response.error) {
      throw new Error(
        `Error while creating queue: ${result.$response.error.message}`,
      );
    }

    const receiveParams = {
      QueueUrl: 'http://elasticmq:9324/queue/test_queue',
      AttributeNames: [],
      MaxNumberOfMessages: 1,
      WaitTimeSeconds: 30,
      VisibilityTimeout: 60,
    };
    const res = await sqs.receiveMessage(receiveParams).promise();

Error

InvalidParameterValue; see the SQS docs.

If I use WaitTimeSeconds: 20 (the default value when elasticmq creates the queue), run correctly

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the receiveMessage handling and parameter validation used by the ElasticMQ SQS-compatible API, then compare the failing WaitTimeSeconds: 30 request with the working value of 20 in the report. Done means the supported behavior is clarified or corrected and covered by a focused test or documentation update.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.