Skip to content

Instantly share code, notes, and snippets.

Created June 29, 2017 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fd1016bb9c5d5cd9e121f1c6d485310d to your computer and use it in GitHub Desktop.
Save anonymous/fd1016bb9c5d5cd9e121f1c6d485310d to your computer and use it in GitHub Desktop.
the description for this gist
class ExchangeConsumerReactiveSubscriberSpec
extends SubscriberBlackboxVerification[OutboundMessage](
new TestEnvironment(300)
) with TestNGSuiteLike {
/* RabbitMQ setup and cleanup code here */
implicit val scheduler = Scheduler.io()
override def createSubscriber() =
new ExchangeConsumer(connection, ExchangeName)
.createSubscriber(Callback.empty, scheduler)
._1.toReactive
override def createElement(element: Int) =
OutboundMessage(routingKey = "foo", body = BigInt(element).toByteArray)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment