title: Spring Cloud QueueMessagingTemplate#convertAndSend Batch
body: <p>I'm trying to send a batch of items to Amazon SQS using Spring Cloud. I'm able to send individual items. However, the time to send it to the queue tends to be multiplied by the number of items I'm sending. I'm basically following the example of the <a href="https://github.com/spring-cloud-samples/aws-refapp/blob/master/src/main/java/org/springframework/cloud/aws/sample/sqs/SqsController.java#L60" rel="noreferrer">reference doc</a></p>
  
  <p>In the <a href="http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatch.html" rel="noreferrer">AWS documentation</a> you can send a batch of up to 10 items at one time. So my question is does the QueueMessagingTemplate or another Spring Cloud class allow you to do this?</p>
  
  <p>This code snippet shows what I want to do. I don't want to send the items as an object because I want each item placed separately on the queue. </p>
  
  <pre><code>@Service
  @EnableConfigurationProperties(SqsConfigMappingProperties.class)
  public class SqsServiceImpl implements SqsService {
  
      @Autowired
      String queueName;
  
      @Autowired
      QueueMessagingTemplate queueMessagingTemplate;
  
      @Override
      public void sendSqsMessage(List items) {
          //Can't really send a batch size here
          int batchSize = 10;
          queueMessagingTemplate.convertAndSend(queueName, items, 10);
      }
  }
  </code></pre>