org.elasticmq.rest.sqs.ChangeMessageVisibilityBatchDirectives.scala Maven / Gradle / Ivy
The newest version!
package org.elasticmq.rest.sqs
import Constants._
import org.elasticmq.rest.sqs.directives.ElasticMQDirectives
trait ChangeMessageVisibilityBatchDirectives {
this: ElasticMQDirectives with ChangeMessageVisibilityDirectives with BatchRequestsModule =>
def changeMessageVisibilityBatch(p: AnyParams) = {
p.action("ChangeMessageVisibilityBatch") {
queueActorFromRequest(p) { queueActor =>
val resultsFuture =
batchRequest("ChangeMessageVisibilityBatchRequestEntry", p) { (messageData, id, _) =>
doChangeMessageVisibility(queueActor, messageData).map { _ =>
{id}
}
}
resultsFuture.map { results =>
respondWith {
{results}
{EmptyRequestId}
}
}
}
}
}
}