Package

com.spingo

op_rabbit

Permalink

package op_rabbit

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

Type Members

  1. trait Binding extends QueueDefinition[Abstract] with ExchangeDefinition[Abstract]

    Permalink
  2. case class ConnectionParams(hosts: Seq[Address] = ..., username: String = ConnectionFactory.DEFAULT_USER, password: String = ConnectionFactory.DEFAULT_PASS, virtualHost: String = ConnectionFactory.DEFAULT_VHOST, ssl: Boolean = false, clientProperties: Map[String, AnyRef] = Map.empty[String, Object], connectionTimeout: Int = 10000, exceptionHandler: ExceptionHandler = new DefaultExceptionHandler(), requestedChannelMax: Int = ..., requestedFrameMax: Int = ConnectionFactory.DEFAULT_FRAME_MAX, requestedHeartbeat: Int = ConnectionFactory.DEFAULT_HEARTBEAT, saslConfig: SaslConfig = DefaultSaslConfig.PLAIN, sharedExecutor: Option[ExecutorService] = None, shutdownTimeout: Int = ..., socketFactory: SocketFactory = SocketFactory.getDefault) extends Product with Serializable

    Permalink

    Because topology recovery strategy configuration is crucial to how op-rabbit works, we don't allow some options to be specified

    Because topology recovery strategy configuration is crucial to how op-rabbit works, we don't allow some options to be specified

    Modeling the allowed options via a case-class allows the compiler to tell the library user which options aren't allowed.

  3. case class Delivery(consumerTag: String, envelope: Envelope, properties: BasicProperties, body: Array[Byte]) extends Product with Serializable

    Permalink

    Represents a message delivery for usage in consumers / Handlers.

  4. type Deserialized[T] = Either[ExtractRejection, T]

    Permalink
  5. trait Deserializer[A, B] extends (A) ⇒ Deserialized[B]

    Permalink
  6. abstract class Directive[+L <: HList] extends AnyRef

    Permalink
  7. type Directive1[T] = Directive[::[T, HNil]]

    Permalink
  8. trait Directives extends AnyRef

    Permalink

    Directives power the declarative DSL of op-rabbit.

    Directives power the declarative DSL of op-rabbit.

    In order to define a consumer, you need a channel directive, a consumer directive, and one or more extractor directives. For example:

    channel(qos = 3) {
      consume(queue("my.queue.name")) {
        (body(as[MyPayloadType]) & optionalProperty(ReplyTo) & optionalProperty(Priority)) { (myPayload, replyTo, priority) =>
          // work ...
          ack
        }
      }
    }

    As seen, directives are composable via &. In the end, the directive is applied with a function whose parameters match the output values from the directive(s).

    One value of the directives, as opposed to accessing the AMQP properties directly, is that they are type safe, and care was taken to reduce the probability of surprise. Death is swiftly issued to null and Object. Some directives, such as property, will nack the message if the value specified can't be extracted; IE it is null. If you'd prefer to use a default value instead of nacking the message, you can specify alternative values using | provide(...).

    (property(ReplyTo) | provide("default-reply-to") { replyTo =>
      // ...
    }

    Note: the directives themselves don't actually do anything, except when applied / returned. IE:

    channel(qos = 3) {
      consume(queue("my.queue.name")) {
        property(ReplyTo) // does absolutely nothing
    
        body(as[MyPayloadType]) { (myPayload, replyTo, priority) =>
          ack // this ack here does absolutely nothing (not the return value)
          // work ...
          ack
        }
      }
    }
  9. trait Exchange[+T <: op_rabbit.Exchange.Value] extends ExchangeDefinition[Concrete]

    Permalink

    Common interface for how exchanges are defined.

    Common interface for how exchanges are defined.

    See:

  10. case class GenericMarshallingException(message: String) extends MarshallingException with Product with Serializable

    Permalink
  11. type Handler = (Promise[ReceiveResult], Delivery) ⇒ Unit

    Permalink
  12. case class InvalidFormat(received: String, error: String) extends MarshallingException with Product with Serializable

    Permalink

    This exception is thrown when a RabbitUnmarshaller tries to unmarshall a message with the wrong contentType specified in the header.

  13. sealed abstract class MarshallingException extends Exception

    Permalink
  14. final class Message extends MessageForPublicationLike

    Permalink

    Confirmed Message container.

    Confirmed Message container. Send to RabbitControl actor for delivery. Upon delivery confirmation, RabbitControl will respond to the sender with true.

    Use the factory method Message$.apply to instantiate one of these using an implicit RabbitMarshaller for serialization.

    See also

    Message$.exchange, Message$.topic, Message$.queue

  15. trait MessageForPublicationLike extends (Channel) ⇒ Unit

    Permalink

    Basic interface; send to RabbitControl actor for delivery.

  16. case class MismatchedContentType(received: String, expected: String) extends MarshallingException with Product with Serializable

    Permalink

    This exception is thrown when a RabbitUnmarshaller tries to unmarshall a message with the wrong contentType specified in the header.

  17. trait Publisher extends AnyRef

    Permalink
  18. class RabbitControl extends Actor with ActorLogging with Stash

    Permalink

    RabbitControl is the top-level actor which handles the following:

    Overview

    RabbitControl is the top-level actor which handles the following:

    - Pull configuration from the rabbitmq config block, and establish connection to RabbitMQ - Manage subscriptions

    Messages received

    RabbitControl accepts the following commands / queries:

  19. trait RabbitErrorLogging extends AnyRef

    Permalink

    Basic trait for reporting error messages; implement to build your own error reporting strategies to be used with consumers

  20. trait RabbitMarshaller[T] extends AnyRef

    Permalink

    This trait is used to serialize messages for publication; it configures a property builder and sets the appropriate headers

    This trait is used to serialize messages for publication; it configures a property builder and sets the appropriate headers

    See also

    RabbitUnmarshaller, UTF8StringMarshaller, BinaryMarshaller

  21. trait RabbitUnmarshaller[T] extends AnyRef

    Permalink

    This trait is used to deserialize messages from binary format for use in Consumers; it checks and honors the contentType / encoding message headers, as appropriate.

    This trait is used to deserialize messages from binary format for use in Consumers; it checks and honors the contentType / encoding message headers, as appropriate.

    See also

    RabbitMarshaller, UTF8StringMarshaller, BinaryMarshaller

  22. sealed trait ReceiveResult extends AnyRef

    Permalink
  23. trait RecoveryStrategy extends (String, Channel, Throwable) ⇒ Handler

    Permalink

    Instructs RabbitMQ what to do in the event of a consumer failure, failure being defined as the handler throwing an exception, the fail directive being used, or ack(Future.failed(ex)) / ack(Failure(ex)).

    Instructs RabbitMQ what to do in the event of a consumer failure, failure being defined as the handler throwing an exception, the fail directive being used, or ack(Future.failed(ex)) / ack(Failure(ex)).

    By contract, RecoveryStrategy accept a queueName, channel, and exception, and return a Handler whose status dictates the fate of the recovered message. A RecoveryStratregy should not do any asynchronous work involving the provided channel

  24. sealed trait Rejection extends Exception

    Permalink
  25. class StatusCheckMessage extends MessageForPublicationLike

    Permalink

    Send this message to RabbitControl to check the status of our connection to the RabbitMQ broker.

  26. class Subscription extends Directives

    Permalink

    A Subscription contains a full definition for a consumer (channel, binding, handling, error recovery, reportings, etc.) subscription

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

  27. trait SubscriptionRef extends AnyRef

    Permalink
  28. class TopicMatcher extends AnyRef

    Permalink
  29. class TypeHolder[T] extends AnyRef

    Permalink
    Attributes
    protected
  30. final class UnconfirmedMessage extends MessageForPublicationLike

    Permalink

Value Members

  1. object BinaryMarshaller extends RabbitMarshaller[Array[Byte]] with RabbitUnmarshaller[Array[Byte]]

    Permalink

    Pull binary message payload raw, without any serialization.

    Pull binary message payload raw, without any serialization. An implicit is defined in RabbitUnmarshaller$.binaryUnmarshaller and RabbitMarshaller$.binaryUnmarshaller

  2. object Binding

    Permalink
  3. object ConnectionParams extends Serializable

    Permalink
  4. object Deserializer extends DeserializerLowerPriorityImplicits

    Permalink
  5. object Directive

    Permalink
  6. object Directives extends Directives

    Permalink

    Convenience object and recommended way for bringing the directives in scope.

    Convenience object and recommended way for bringing the directives in scope. See Directives trait.

  7. object Exchange extends Enumeration

    Permalink
  8. object Message extends MessageFactory[Message]

    Permalink

    Confirmed message generator.

    Confirmed message generator. See Message$

  9. object MessageForPublicationLike

    Permalink
  10. object ModeledConsumerArgs

    Permalink
  11. object ModeledMessageHeaders

    Permalink
  12. object Publisher

    Permalink
  13. object Queue

    Permalink
  14. object RabbitConfig

    Permalink
  15. object RabbitControl

    Permalink
  16. object RabbitErrorLogging

    Permalink
  17. object RabbitExceptionMatchers

    Permalink
  18. object RabbitHelpers

    Permalink
  19. object RabbitMarshaller

    Permalink
  20. object RabbitUnmarshaller

    Permalink
  21. object ReceiveResult

    Permalink
  22. object RecoveryStrategy

    Permalink
  23. object Rejection extends Serializable

    Permalink
  24. object Slf4jLogger extends RabbitErrorLogging

    Permalink

    Reports consumer errors to Slf4j.

  25. object StatusCheckMessage

    Permalink
  26. object Subscription

    Permalink
  27. object SubscriptionActor

    Permalink
  28. object TopicMatcher

    Permalink
  29. object TypeHolder

    Permalink
    Attributes
    protected
  30. object UTF8StringMarshaller extends RabbitMarshaller[String] with RabbitUnmarshaller[String]

    Permalink

    Converts binary message to a UTF8 string, and back.

    Converts binary message to a UTF8 string, and back. An implicit is defined in RabbitUnmarshaller$.stringMarshaller and RabbitMarshaller$.stringMarshaller

  31. object UnconfirmedMessage extends MessageFactory[UnconfirmedMessage]

    Permalink
  32. val futureUnit: Future[Unit]

    Permalink
    Attributes
    protected
  33. package properties

    Permalink

Deprecated Value Members

  1. object LogbackLogger extends RabbitErrorLogging

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.2) LogbackLogger has been renamed to Slf4jLogger

Inherited from AnyRef

Inherited from Any

Ungrouped