use of com.amazonaws.services.sqs.model.PurgeQueueRequest in project apex-malhar by apache.
the class SQSTestBase method produceMsg.
public void produceMsg(String[] msgs, boolean purgeFirst) throws Exception {
CreateQueueResult res = sqs.createQueue(getCurrentQueueName());
if (purgeFirst) {
PurgeQueueRequest purgeReq = new PurgeQueueRequest(res.getQueueUrl());
sqs.purgeQueue(purgeReq);
}
for (String text : msgs) {
sqs.sendMessage(res.getQueueUrl(), text);
}
}
use of com.amazonaws.services.sqs.model.PurgeQueueRequest in project tutorials by eugenp.
the class SpringCloudSQSIntegrationTest method cleanupAwsResources.
@AfterClass
public static void cleanupAwsResources() {
AmazonSQS amazonSQS = SpringCloudAwsTestUtil.amazonSQS();
PurgeQueueRequest receiveQueuePurge = new PurgeQueueRequest(receiveQueueUrl);
amazonSQS.purgeQueue(receiveQueuePurge);
amazonSQS.deleteQueue(receiveQueueUrl);
PurgeQueueRequest sendQueuePurge = new PurgeQueueRequest(sendQueueURl);
amazonSQS.purgeQueue(sendQueuePurge);
amazonSQS.deleteQueue(sendQueueURl);
}
Aggregations