Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Option to set long pooling wait time #65

Open
franciscoantonello opened this issue Nov 18, 2021 · 0 comments
Open

[feature] Option to set long pooling wait time #65

franciscoantonello opened this issue Nov 18, 2021 · 0 comments

Comments

@franciscoantonello
Copy link

Sometimes when we are moving messages, SQS responds with an empty list of messages (empty receives), even if the queue still has messages to be moved.

Would be nice if we could set the WaitTimeSeconds parameter

	var params = &sqs.ReceiveMessageInput{
		QueueUrl:              aws.String(sourceQueueUrl),
		VisibilityTimeout:     aws.Int64(2),
		WaitTimeSeconds:       aws.Int64(*waitTimeSeconds), // something like this
		MaxNumberOfMessages:   aws.Int64(*maxBatchSize),
		MessageAttributeNames: []*string{aws.String(sqs.QueueAttributeNameAll)},
		AttributeNames: []*string{
			aws.String(sqs.MessageSystemAttributeNameMessageGroupId),
			aws.String(sqs.MessageSystemAttributeNameMessageDeduplicationId)},
	}

Of course, this is just to show the parameter.
We also should create the flag and validations (wait time should be between 0 and 20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant