Ack the message
Ack the message
Examples:
ack()
ack(Future {
//Some work
})
Note that in the case of acking with a Future, if the Future fails, then the message is counted as erroneous, and the RecoveryStrategy is use is applied.
Extract the message body.
Extract the message body. Uses a RabbitUnmarshaller to deserialize.
Example:
body(as[JobDescription])
Declarative which declares a channel
Declarative which declares a channel
Declarative which declares a consumer
Declarative which declares a consumer
Directive which yields the exchange through which the message was published
Directive which yields the exchange through which the message was published
Extract any arbitrary value from the delivery / Java RabbitMQ objects.
Extract any arbitrary value from the delivery / Java RabbitMQ objects. Accepts a function which receives a Delivery and returns some value.
Like extract, but the provided function should return an Either, with left for a rejection, right for success.
Like extract, but the provided function should return an Either, with left for a rejection, right for success.
Fail the given element
Fail the given element
Directive which yields whether this message been delivered once before (although, not necessarily received)
Directive which yields whether this message been delivered once before (although, not necessarily received)
Nack the message; does NOT trigger the RecoveryStrategy in use.
Nack the message; does NOT trigger the RecoveryStrategy in use.
Given a property, yields Some(value).
Given a property, yields Some(value). If the underlying value does not exist (is null), then it yields None.
Passive topic binding
Passive topic binding
Passive queue binding
Passive queue binding
Given a property, yields it's value.
Given a property, yields it's value. If the underlying value does not exist (is null), then it nacks.
Provides values for the consume directive.
Provides values for the consume directive.
Directive which yields the routingKey (topic) through which the message was published
Directive which yields the routingKey (topic) through which the message was published
A Subscription contains a full definition for a consumer (channel, binding, handling, error recovery, reportings, etc.) subscription
This object is sent to RabbitControl to boot.
Example instantiation:
Subscription { import Directives._
channel(qos = 1) { consume(queue("such-queue")) { body(as[String]) { payload => // do work... ack } } } }