Skip to content

Needs clarification ... #761

@BruceGitHub

Description

@BruceGitHub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions