Package com.amazonaws.services.sqs.model

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


      String ralativeUrl = Util.getRelativeForAbsoluteQueueUrl(queueUrl);
      //String message = "hello world";
      int num = 10;
      String message = "test";
      for (int i = 0 ; i < num; i++) {
        cqs1.sendMessage(new SendMessageRequest(queueUrl, message + i));
/*        try {
        Thread.sleep(10);
        } catch (Exception e) {
          fail("exception while sleep " + e);
        }*/
 
View Full Code Here


      } else {
        logger.info("using small test message");
        message = text;
      }
     
      cqs1.sendMessage(new SendMessageRequest(queueUrl, message.toString()));
      ReceiveMessageResult result = cqs1.receiveMessage(new ReceiveMessageRequest(queueUrl));
     
      attributes.put("IsCompressed", "false");
      cqs1.setQueueAttributes(new SetQueueAttributesRequest(queueUrl,attributes));
     
View Full Code Here

              msg += "-" + messageFromFile + generateRandomMessage(100);
            }
           
            long start = System.currentTimeMillis();
           
            SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, msg);
           
            if (delaySeconds > 0) {
              sendMessageRequest.setDelaySeconds(delaySeconds);
            }
           
            SendMessageResult result = cqs1.sendMessage(sendMessageRequest);
            long end = System.currentTimeMillis();
            recordResponseTime(null, end-start);
View Full Code Here

     
      logger.info("starting sender");
     
      try {

          SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, message);
          cqs1.sendMessage(sendMessageRequest);

          ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest();
        receiveMessageRequest.setQueueUrl(queueUrl);
        receiveMessageRequest.setMaxNumberOfMessages(1);
View Full Code Here

      while (true) {
        try {
          Thread.currentThread().sleep(sendDelay);
          long start = System.currentTimeMillis();
          String body = generateRandomMessage(20000);
          SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, body);
          SendMessageResult result = cqs1.sendMessage(sendMessageRequest);
          transactions.put(result.getMessageId(), System.currentTimeMillis());
          long end = System.currentTimeMillis();
          sendSuccessCount.incrementAndGet();
          logger.info("event=message_sent rt="+(end-start)+" success_count=" + sendSuccessCount.get() + " failure_count=" + sendFailureCount.get());
View Full Code Here

        String queueUrl = getQueueUrl(1, USR.USER1);
        cqs1.setQueueAttributes(new SetQueueAttributesRequest(queueUrl, attributeParams));

        Thread.sleep(1000);
       
            cqs1.sendMessage(new SendMessageRequest(queueUrl, "test message"));

            long ts1 = System.currentTimeMillis();
           
            while (true) {
           
View Full Code Here

        String queueUrl = getQueueUrl(1, USR.USER1);
        cqs1.setQueueAttributes(new SetQueueAttributesRequest(queueUrl, attributeParams));

        Thread.sleep(1000);

        SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, "test message");
        sendMessageRequest.setDelaySeconds(10);
       
            cqs1.sendMessage(sendMessageRequest);

            long ts1 = System.currentTimeMillis();
           
View Full Code Here

        Thread.sleep(1000);

        for (int i=0; i<1000; i++) {
          logger.info("event=sending_message no=" + i);
          SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, "test message " + i);
          sendMessageRequest.setDelaySeconds(20);
              cqs1.sendMessage(sendMessageRequest);
        }

            long ts1 = System.currentTimeMillis();
            int count = 0;
View Full Code Here

        Thread.sleep(1000);

        for (int i=0; i<1000; i++) {
          logger.info("event=sending_message no=" + i);
          SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, "test message " + i);
          sendMessageRequest.setDelaySeconds(60);
              cqs1.sendMessage(sendMessageRequest);
        }

      logger.info("event=sending_message no=" + 1001);
      SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, "test message 1001");
        sendMessageRequest.setDelaySeconds(4);
            cqs1.sendMessage(sendMessageRequest);

            long ts1 = System.currentTimeMillis();
            int count = 0;
           
View Full Code Here

        Thread.sleep(1000);

        for (int i=0; i<1000; i++) {
          logger.info("event=sending_message no=" + i);
          SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, "test message " + i);
          sendMessageRequest.setDelaySeconds(0);
              cqs1.sendMessage(sendMessageRequest);
        }

            long ts1 = System.currentTimeMillis();
            int count = 0;
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sqs.model.SendMessageRequest

Copyright © 2018 www.massapicom. 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.