Class/Object

com.spingo.op_rabbit

Subscription

Related Docs: object Subscription | package op_rabbit

Permalink

class Subscription extends Directives

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 } } } }

Linear Supertypes
Directives, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Subscription
  2. Directives
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def ack: Handler

    Permalink
    Definition Classes
    Directives
  5. def ack(f: Ackable): Handler

    Permalink

    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.

    Definition Classes
    Directives
  6. def as[T](implicit um: RabbitUnmarshaller[T]): RabbitUnmarshaller[T]

    Permalink
    Definition Classes
    Directives
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def body[T](um: RabbitUnmarshaller[T]): Directive1[T]

    Permalink

    Extract the message body.

    Extract the message body. Uses a RabbitUnmarshaller to deserialize.

    Example:

    body(as[JobDescription])
    Definition Classes
    Directives
  9. def channel(qos: Int = 1): ChannelDirective

    Permalink

    Declarative which declares a channel

    Declarative which declares a channel

    Definition Classes
    Directives
  10. lazy val channelConfig: ChannelConfiguration

    Permalink
    Attributes
    protected[com.spingo.op_rabbit]
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def consume(binding: QueueDefinition[Concreteness], args: Seq[Header] = Seq(), consumerTagPrefix: Option[String] = None): BindingDirective

    Permalink

    Declarative which declares a consumer

    Declarative which declares a consumer

    Definition Classes
    Directives
  13. lazy val consumer: BoundConsumerDefinition

    Permalink
    Attributes
    protected[com.spingo.op_rabbit]
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def exchange: Directive1[String]

    Permalink

    Directive which yields the exchange through which the message was published

    Directive which yields the exchange through which the message was published

    Definition Classes
    Directives
  17. def extract[T](map: (Delivery) ⇒ T): Directive1[T]

    Permalink

    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.

    Definition Classes
    Directives
  18. def extractEither[T](map: (Delivery) ⇒ Either[Rejection, T]): Directive1[T]

    Permalink

    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.

    Definition Classes
    Directives
  19. def fail(ex: Throwable): Handler

    Permalink

    Fail the given element

    Fail the given element

    Definition Classes
    Directives
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hprovide[T <: HList](value: T): Directive[T]

    Permalink
    Definition Classes
    Directives
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isRedeliver: Directive1[Boolean]

    Permalink

    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)

    Definition Classes
    Directives
  26. def nack(requeue: Boolean = false): Handler

    Permalink

    Nack the message; does NOT trigger the RecoveryStrategy in use.

    Nack the message; does NOT trigger the RecoveryStrategy in use.

    Definition Classes
    Directives
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def optionalProperty[T](extractor: PropertyExtractor[T]): Directive1[Option[T]]

    Permalink

    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.

    Definition Classes
    Directives
  31. def passive[T <: Exchange.Value](exchange: Exchange[T]): Exchange[T]

    Permalink
    Definition Classes
    Directives
  32. def passive[T <: Concreteness](queue: QueueDefinition[T]): QueueDefinition[T]

    Permalink

    Passive topic binding

    Passive topic binding

    Definition Classes
    Directives
  33. def pqueue(queue: String): QueueDefinition[Concrete]

    Permalink

    Passive queue binding

    Passive queue binding

    Definition Classes
    Directives
  34. def property[T](extractor: PropertyExtractor[T]): Directive1[T]

    Permalink

    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.

    Definition Classes
    Directives
  35. def provide[T](value: T): Directive[::[T, HNil]]

    Permalink

    Definition Classes
    Directives
  36. def queue(queue: String, durable: Boolean = true, exclusive: Boolean = false, autoDelete: Boolean = false): QueueDefinition[Concrete]

    Permalink

    Provides values for the consume directive.

    Provides values for the consume directive.

    Definition Classes
    Directives
  37. lazy val queue: QueueDefinition[Concreteness]

    Permalink
    Attributes
    protected[com.spingo.op_rabbit]
  38. def routingKey: Directive1[String]

    Permalink

    Directive which yields the routingKey (topic) through which the message was published

    Directive which yields the routingKey (topic) through which the message was published

    Definition Classes
    Directives
  39. def run(rabbitControl: ActorRef, timeout: FiniteDuration = 5.seconds): SubscriptionRef

    Permalink
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  42. def topic(queue: QueueDefinition[Concrete], topics: List[String], exchange: Exchange[Topic.type] = ...): Binding

    Permalink
    Definition Classes
    Directives
  43. def typeOf[T]: TypeHolder[T]

    Permalink
    Definition Classes
    Directives
  44. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Directives

Inherited from AnyRef

Inherited from Any

Ungrouped