How to do it...

For this recipe, perform the following steps:

  1. Get the required dependency. For this, add the following line to your build.sbt file:
        libraryDependencies += "com.lightbend.akka" %         "akka-stream-alpakka-amqp_2.11" % "0.5"
  1. Run sbt update to retrieve the dependencies from the central repository.
  2. Create a file named ProcessingRabbitMQApplication.scala inside the com.packt.chapter8 package. Here, define your AMQP Source and Sink and a mapping stage to apply uppercase to the String value. The content should look like this:
        package com.packt.chapter8        import akka.actor.ActorSystem        import akka.stream.ActorMaterializer        import akka.stream.alpakka.amqp._        import akka.stream.alpakka.amqp.scaladsl.{AmqpSink,          AmqpSource}        import akka.util.ByteString ...

Get Akka Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.