com.spingo.op_rabbit
To use this package, you must add 'op-rabbit-spray-json' to your dependencies.
'op-rabbit-spray-json'
Use implicit SprayJson formats for serialization by importing this object.
Example:
import spray.json.DefaultJsonProtocol import com.spingo.op_rabbit.SprayJsonSupport._ object Example extends DefaultJsonProtocol { case class Person(name: String, age: Int) implicit val format = jsonFormat2(Person) // Both of these can be implicitly created: // - implicitly[RabbitMarshaller[Person]] // - implicitly[RabbitUnmarshaller[Person]] val consumer = AsyncAckingConsumer[Person]("PurplePeopleEater") { person => Future { eat(person) } } val message = QueueMessage(Person("Bill", 25), "people-for-consumption") }
BATTERIES NOT INCLUDED
To use this package, you must add
'op-rabbit-spray-json'
to your dependencies.Overview
Use implicit SprayJson formats for serialization by importing this object.
Example: