Examples of ReceiveMessageRequest


Examples of com.amazonaws.services.sqs.model.ReceiveMessageRequest

        }

        logger.info("Receive messages with invalid max number of messages");
       
        try {
            ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl);
            receiveMessageRequest.setVisibilityTimeout(10);
            receiveMessageRequest.setMaxNumberOfMessages(12);
            cqs1.receiveMessage(receiveMessageRequest).getMessages();
          fail("missing expected exception");
        } catch (AmazonServiceException ase) {
            assertTrue("Did not get an invalid value exception", ase.getErrorCode().contains(CQSErrorCodes.InvalidParameterValue.getCMBCode()));
        }

        logger.info("Receive messages with invalid max number of messages");
       
        try {
            ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl);
            receiveMessageRequest.setVisibilityTimeout(10);
            receiveMessageRequest.setMaxNumberOfMessages(0);
            cqs1.receiveMessage(receiveMessageRequest).getMessages();
          fail("missing expected exception");
        } catch (AmazonServiceException ase) {
            assertTrue("Did not get an invalid value exception", ase.getErrorCode().contains(CQSErrorCodes.InvalidParameterValue.getCMBCode()));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.