Closed AbacusIntegrationPlatform closed 6 years ago
Ok, figured it out -
import com.spingo.op_rabbit.properties._
consume(Queue.passive(queue(s"${queuename}"))) {
(body(as[String]) & optionalProperty(TypedHeader[Int]("x-retry"))) { (message, TypedHeader) =>
println (TypedHeader.getOrElse(0))
}
ack
}
TypedHeader is where we can access it.
How do I access x-retry header INT from the message
Currently i am trying with
properties.TypedHeader[Int]("x-retry")
But the out of this is<function1>
What is the right way to retrieve the x-retry count from the message header ?