What should the developer do to increase the number of messages the application receives?
Call the ChangeMessageVisibility API for the queue and set MaxNumberOfMessages to a value greater than the default of 1.
Call the AddPermission API to set MaxNumberOfMessages for the ReceiveMessage action to a value greater than the default of 1.
Call the ReceiveMessage API to set MaxNumberOfMessages to a value greater than the default of 1.
Call the SetQueueAttributes API for the queue and set MaxNumberOfMessages to a value greater than the default of 1.
Explanations:
TheChangeMessageVisibilityAPI is used to change the visibility timeout of messages, not the number of messages received by the application.
TheAddPermissionAPI is used to grant permissions for actions on the SQS queue. It does not control how many messages the application receives.
TheReceiveMessageAPI allows specifying theMaxNumberOfMessagesparameter, which determines how many messages the application will receive in a single request. The default is 1, and increasing it allows the application to receive more messages in each invocation.
TheSetQueueAttributesAPI is used to change queue-level attributes, but it does not include a parameter forMaxNumberOfMessagesto directly control the number of messages received in each invocation.