Created
March 12, 2018 23:10
-
-
Save vhutov/039471f6a4fbdbbc73f732105e4f973e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.concurrent.duration._ | |
import io.gatling.core.Predef._ | |
import Predef._ | |
class Test extends Simulation { | |
val kafkaP = kafkaProtocol.properties(Map("bootstrap.servers" -> "localhost:9092")) | |
val jmsP = jmsProtocol.url("localhost:7222") | |
val action = generic("request") | |
.send(extractMessage) | |
.via(kafka[MyMessage].topic("some_topic").withKeyExtractor(msg => Some(msg.id))) | |
.receive(jms.queue("some_queue").timeout(3 seconds)) | |
//... | |
private def extractMessage(session: Session) = MyMessage(session("id").as[String]) | |
case class MyMessage(id: String) extends Message | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment