aws/SqsProvider.js
/**
		 * Reads from the queue and deletes any messages that are read. After
		 * the operation, the queue will not necessarily be empty.
		 *
		 * @public
		 * @param {string} queueName - The name of the queue to read.
		 * @param {Number=} waitDuration - The maximum amount of time the server-side long-poll will wait for messages to become available.
		 * @param {Number=} maximumMessages - The maximum number of messages to read (cannot be more than 10).
		 * @param {Boolean=} synchronousDelete - If true, the promise won't resolve until new messages have been read *and deleted* from the queue.
		 * @returns {Promise<Object[]>}
		 */
Reads from the queue and deletes any messages that are read. After
the operation, the queue will not necessarily be empty.

@public
@param {string} queueName - The name of the queue to read.
@param {Number=} waitDuration - The maximum amount of time the server-side long-poll will wait for messages to become available.
@param {Number=} maximumMessages - The maximum number of messages to read (cannot be more than 10).
@param {Boolean=} synchronousDelete - If true, the promise won't resolve until new messages have been read *and deleted* from the queue.
@returns {Promise}
Reads from the queue and deletes any messages that are read . After the operation the queue will not necessarily be empty . @public @param { string } queueName - The name of the queue to read . @param { Number = } waitDuration - The maximum amount of time the server - side long - poll will wait for messages to become available . @param { Number = } maximumMessages - The maximum number of messages to read ( cannot be more than 10 ) . @param { Boolean = } synchronousDelete - If true the promise won ' t resolve until new messages have been read * and deleted * from the queue . @returns { Promise }
receive(queueName, waitDuration, maximumMessages, synchronousDelete) {
			return Promise.resolve()
				.then(() => {
					assert.argumentIsRequired(queueName, 'queueName', String);
					assert.argumentIsOptional(waitDuration, 'waitDuration', Number);
					assert.argumentIsOptional(maximumMessages, 'maximumMessages', Number);
					assert.argumentIsOptional(synchronousDelete, 'synchronousDelete', Boolean);
					checkReady.call(this);
					const qualifiedQueueName = getQualifiedQueueName(this._configuration.prefix, queueName);
					if (this._queueObservers.hasOwnProperty(qualifiedQueueName)) {
						throw new Error('The queue is being observed.');
					}
					return receiveMessages.call(this, queueName, waitDuration, maximumMessages, synchronousDelete);
				});
		}
receive ( queueName , waitDuration , maximumMessages , synchronousDelete ) { return Promise . resolve ( ) . then ( ( ) => { assert . argumentIsRequired ( queueName , 'queueName' , String ) ; assert . argumentIsOptional ( waitDuration , 'waitDuration' , Number ) ; assert . argumentIsOptional ( maximumMessages , 'maximumMessages' , Number ) ; assert . argumentIsOptional ( synchronousDelete , 'synchronousDelete' , Boolean ) ; checkReady . call ( this ) ; const qualifiedQueueName = getQualifiedQueueName ( this . _configuration . prefix , queueName ) ; if ( this . _queueObservers . hasOwnProperty ( qualifiedQueueName ) ) { throw new Error ( 'The queue is being observed.' ) ; } return receiveMessages . call ( this , queueName , waitDuration , maximumMessages , synchronousDelete ) ; } ) ; }
Reads from the queue and deletes any messages that are read.
Reads from the queue and deletes any messages that are read .